commit:     39506790db32c1b880fab899fd326448ff4b465b
Author:     Nicolas PARLANT <nicolas.parlant <AT> parhuet <DOT> fr>
AuthorDate: Fri Oct  3 08:56:44 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct  4 01:17:41 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39506790

app-office/dia: add 0.98_pre20250913 gtk3 snapshot

snapshot with gtk3

add deps inherited from gtk+3
remove dev-libs/popt, media-libs/libart_lgpl no longer used

use GDK_WINDOWING workaround for X (no automagic links but ifdef in
code)

patches :
make plugins w/ deps conditional
(debian)use xpm loader from gdk instead of xpm-pixbuf (fork from dia' dev)
(debian)use Gtk.FontChooser to speed the font-selector

tests are still disabled by upstream

Closes: https://bugs.gentoo.org/734274
Closes: https://bugs.gentoo.org/825086
Signed-off-by: Nicolas PARLANT <nicolas.parlant <AT> parhuet.fr>
Part-of: https://github.com/gentoo/gentoo/pull/44019
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-office/dia/Manifest                            |   1 +
 app-office/dia/dia-0.98_pre20250913.ebuild         | 104 +++++
 app-office/dia/files/dia-0.98-deps_optional.patch  |  76 ++++
 .../files/dia-0.98-revert_xpm_replacement.patch    | 193 ++++++++
 .../dia/files/dia-0.98-use_gtkfontbutton.patch     | 496 +++++++++++++++++++++
 app-office/dia/files/dia-2004-11-26.1              | 460 +++++++++++++++++++
 app-office/dia/metadata.xml                        |   3 +
 7 files changed, 1333 insertions(+)

diff --git a/app-office/dia/Manifest b/app-office/dia/Manifest
index 730f1f295f88..41284f88acf7 100644
--- a/app-office/dia/Manifest
+++ b/app-office/dia/Manifest
@@ -1 +1,2 @@
 DIST dia-0.97.3.tar.xz 5548500 BLAKE2B 
ab476ce48e57c1def01095a8d6d92208c11817580cfca1cfcf38af12943153116b31149ca187c65e5121ef9fb281bacc4c3e7f1726ed23b46ba14902faaaa34f
 SHA512 
34298980be930b87cb4a636344e4cb2a7e43eedc00b0969a5e446cee9b74b616fdc8c798efcb9a5832b98741f2e20632a44037b2bcb436f59591d531ef441efa
+DIST dia-22534d16c317ee11714ef7221f9b635df233be9b.tar.bz2 9446286 BLAKE2B 
17fa7c243c51d5ecf33156b77600d155f4245db958c1a434f4faca6387a10ff85786d68f0065c1f430cf35583141282a84ba0181bc31f8489c9309753156763a
 SHA512 
6b2791d0127a86455de78767124d4564e7ea5bd318d84b1a830d07e571e398565527e9f41748cb1cddbee738cd28a670f107caad13958cac3a576e2a6a9c8726

diff --git a/app-office/dia/dia-0.98_pre20250913.ebuild 
b/app-office/dia/dia-0.98_pre20250913.ebuild
new file mode 100644
index 000000000000..491f3ffbae85
--- /dev/null
+++ b/app-office/dia/dia-0.98_pre20250913.ebuild
@@ -0,0 +1,104 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..14} )
+inherit flag-o-matic meson python-single-r1 xdg
+
+COMMIT_HASH="22534d16c317ee11714ef7221f9b635df233be9b"
+MAN_DATE="2004-11-26"
+DESCRIPTION="Diagram/flowchart creation program"
+HOMEPAGE="https://wiki.gnome.org/Apps/Dia";
+SRC_URI="https://gitlab.gnome.org/GNOME/${PN}/-/archive/${COMMIT_HASH}/${PN}-${COMMIT_HASH}.tar.bz2";
+S="${WORKDIR}/${PN}-${COMMIT_HASH}"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc 
~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc pdf python wmf xslt X"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+DEPEND="
+       >=dev-libs/glib-2.76:2
+       >=dev-libs/libxml2-2.14:=
+       >=media-libs/graphene-1.10
+       x11-libs/cairo
+       x11-libs/gdk-pixbuf:2
+       >=x11-libs/gtk+-3.24:3[X?]
+       x11-libs/pango
+       pdf? ( >=app-text/poppler-21.03.0:=[cxx] )
+       python? ( ${PYTHON_DEPS} )
+       wmf? ( media-libs/libemf )
+       xslt? ( dev-libs/libxslt )
+"
+RDEPEND="
+       ${DEPEND}
+       python? ( $(python_gen_cond_dep 
'dev-python/pygobject[${PYTHON_USEDEP}]') )
+"
+BDEPEND="
+       dev-util/desktop-file-utils
+       dev-util/glib-utils
+       sys-devel/gettext
+       virtual/pkgconfig
+       doc? (
+               app-text/docbook-xml-dtd
+               app-text/docbook-xsl-stylesheets
+               dev-libs/libxslt
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.98-revert_xpm_replacement.patch
+       "${FILESDIR}"/${PN}-0.98-use_gtkfontbutton.patch
+       "${FILESDIR}"/${PN}-0.98-deps_optional.patch
+)
+
+pkg_setup() {
+       use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+       default
+
+       # avoid doc in /usr/share/dia/help
+       # do not build pdf with dblatex
+       sed -e "s:^helpdir =.*$:helpdir = datadir / 'doc' / '${PF}' / 'html':" \
+               -e "/^dblatex = /s:find_program(.*):disabler():" \
+               -i doc/meson.build
+       sed -e "/.*helpdir =.*$/s:\"help\":\"../doc/${PF}/html\":" \
+               -i app/commands.c || die
+
+       # use local docbook
+       sed -e "s:^DB2MAN =.*$:DB2MAN = 
'${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl':" \
+               -i doc/meson.build
+}
+
+src_configure() {
+       use pdf && append-cxxflags -std=c++20
+
+       # 'if(n)def GDK_WINDOWING_X11' for clipboard and font context
+       use X || append-cppflags -DGENTOO_GTK_HIDE_X11
+
+       local emesonargs=(
+               $(meson_feature doc)
+               -Dpdf=$(usex pdf true false)
+               -Dpython=$(usex python true false)
+               # from tests/meson.build "Most of these tests are currently 
broken"
+               -Dtests=false
+               -Dwmf=$(usex wmf true false)
+               -Dxslt=$(usex xslt true false)
+       )
+       meson_src_configure
+}
+
+src_install() {
+       meson_src_install
+
+       use doc || newman "${FILESDIR}"/${PN}-${MAN_DATE}.1 ${PN}.1
+
+       if use python; then
+               python_fix_shebang "${ED}"/usr/share/dia
+               python_optimize "${ED}"/usr/share/dia
+       fi
+}

diff --git a/app-office/dia/files/dia-0.98-deps_optional.patch 
b/app-office/dia/files/dia-0.98-deps_optional.patch
new file mode 100644
index 000000000000..6cfe75ee0962
--- /dev/null
+++ b/app-office/dia/files/dia-0.98-deps_optional.patch
@@ -0,0 +1,76 @@
+make the plugins w/ deps conditional
+--- a/meson.build
++++ b/meson.build
+@@ -47,14 +47,14 @@ if xsltproc.found()
+ endif
+ 
+ # Optional deps
+-libpoppler_dep = dependency('poppler', version: '> 21.03.0', required: false)
+-libpopplercpp_dep = dependency('poppler-cpp', required: false)
++libpoppler_dep = dependency('poppler', version: '> 21.03.0', required: 
get_option('pdf'))
++libpopplercpp_dep = dependency('poppler-cpp', required: get_option('pdf'))
+ conf.set('HAVE_POPPLER', libpoppler_dep.found() and libpopplercpp_dep.found())
+-libemf_dep = cc.find_library('EMF', required: false)
++libemf_dep = cc.find_library('EMF', required: get_option('wmf'))
+ conf.set('HAVE_LIBEMF', libemf_dep.found())
+ libogdf_dep = cc.find_library('ogdf', required: false)
+ conf.set('HAVE_OGDF', libogdf_dep.found())
+-libxslt_dep = dependency('libxslt', required: false)
++libxslt_dep = dependency('libxslt', required: get_option('xslt'))
+ conf.set('HAVE_XSLT', libxslt_dep.found())
+ # TODO: Why does Win32 break without this
+ conf.set('ENABLE_NLS', true)
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -4,6 +4,18 @@ option('gtk_doc',
+ option('doc',
+        type: 'feature', deprecated: {'true': 'enabled', 'false': 'disabled'},
+        description: 'Whether to generate the doc')
++option('pdf',
++       type: 'boolean', value: true,
++       description: 'Whether to compile with pdf plugin')
++option('python',
++       type: 'boolean', value: true,
++       description: 'Whether to compile with python plugin')
+ option('tests',
+        type: 'boolean', value: true,
+        description: 'Whether to compile unit tests')
++option('wmf',
++       type: 'boolean', value: true,
++       description: 'Whether to compile with wmf plugin')
++option('xslt',
++       type: 'boolean', value: true,
++       description: 'Whether to compile with xslt plugin')
+--- a/plug-ins/meson.build
++++ b/plug-ins/meson.build
+@@ -17,20 +17,26 @@ subdir('shape')
+ subdir('pixbuf')
+ subdir('layout')  # Non-standard: shared_module
+ subdir('metapost')
+-subdir('pdf')
++if get_option('pdf')
++  subdir('pdf')
++endif
+ subdir('pgf')
+ subdir('pstricks')
+-subdir('python')  # Non-standard: shared_module
++if get_option('python')
++  subdir('python')  # Non-standard: shared_module
++endif
+ subdir('stress')
+ subdir('svg')
+ subdir('vdx')
+ # TODO: Port to Windows.
+-if host_machine.system() != 'windows'
++if host_machine.system() != 'windows' and get_option('wmf')
+   subdir('wmf')  # Non-standard: Only installs if libemf present.
+ endif
+ subdir('wpg')
+ subdir('xfig')
+-subdir('xslt')
++if get_option('xslt')
++  subdir('xslt')
++endif
+ 
+ foreach p : install_plugins_desc
+     message(p.get('name'))

diff --git a/app-office/dia/files/dia-0.98-revert_xpm_replacement.patch 
b/app-office/dia/files/dia-0.98-revert_xpm_replacement.patch
new file mode 100644
index 000000000000..09d2d0160965
--- /dev/null
+++ b/app-office/dia/files/dia-0.98-revert_xpm_replacement.patch
@@ -0,0 +1,193 @@
+https://salsa.debian.org/debian/dia/-/blob/debian/0.98+git20250827-2/debian/patches/revert_xpm_loader_replacement.patch
+See https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/169
+This patch reverts upstream commit 1ba72d126055130474b4ce589b1f3002972ba490
+"general: use xpm-pixbuf to load xpms".
+Use loader from GdkPixbuf as long as available, instead of the fork xpm-pixbuf
+--- a/app/dia-colour-area.c
++++ b/app/dia-colour-area.c
+@@ -22,8 +22,6 @@
+ 
+ #include <stdio.h>
+ 
+-#include <xpm-pixbuf.h>
+-
+ #include "attributes.h"
+ #include "persistence.h"
+ 
+@@ -297,8 +295,8 @@ dia_colour_area_class_init (DiaColourAreaClass *class)
+ static void
+ dia_colour_area_init (DiaColourArea *self)
+ {
+-  self->reset = xpm_pixbuf_load (default_xpm);
+-  self->swap = xpm_pixbuf_load (swap_xpm);
++  self->reset = gdk_pixbuf_new_from_xpm_data (default_xpm);
++  self->swap = gdk_pixbuf_new_from_xpm_data (swap_xpm);
+ 
+   gtk_widget_set_events (GTK_WIDGET (self), GDK_BUTTON_PRESS_MASK);
+ }
+--- a/app/dia-page-layout.c
++++ b/app/dia-page-layout.c
+@@ -25,8 +25,6 @@
+ 
+ #include <glib/gi18n-lib.h>
+ 
+-#include <xpm-pixbuf.h>
+-
+ #include "dia-page-layout.h"
+ 
+ #include "pixmaps/portrait.xpm"
+@@ -148,7 +146,7 @@ dia_page_layout_init (DiaPageLayout *self)
+ 
+   self->orient_portrait = gtk_radio_button_new (NULL);
+ 
+-  wid = gtk_image_new_from_pixbuf (xpm_pixbuf_load (portrait_xpm));
++  wid = gtk_image_new_from_pixbuf (gdk_pixbuf_new_from_xpm_data 
(portrait_xpm));
+   gtk_container_add (GTK_CONTAINER (self->orient_portrait), wid);
+   gtk_widget_show (wid);
+ 
+@@ -157,7 +155,7 @@ dia_page_layout_init (DiaPageLayout *self)
+ 
+   self->orient_landscape = gtk_radio_button_new (
+         gtk_radio_button_get_group (GTK_RADIO_BUTTON 
(self->orient_portrait)));
+-  wid = gtk_image_new_from_pixbuf (xpm_pixbuf_load (landscape_xpm));
++  wid = gtk_image_new_from_pixbuf (gdk_pixbuf_new_from_xpm_data 
(landscape_xpm));
+   gtk_container_add (GTK_CONTAINER (self->orient_landscape), wid);
+   gtk_widget_show (wid);
+ 
+--- a/app/navigation.c
++++ b/app/navigation.c
+@@ -24,8 +24,6 @@
+ 
+ #include <gtk/gtk.h>
+ 
+-#include <xpm-pixbuf.h>
+-
+ #include "diagram.h"
+ #include "display.h"
+ #include "renderer/diacairo.h"
+@@ -489,7 +487,7 @@ navigation_popup_new (DDisplay *ddisp)
+                     "released", G_CALLBACK 
(on_button_navigation_popup_released),
+                     NULL);
+ 
+-  pixbuf = xpm_pixbuf_load (nav_xpm);
++  pixbuf = gdk_pixbuf_new_from_xpm_data (nav_xpm);
+ 
+   image = gtk_image_new_from_pixbuf (pixbuf);
+ 
+--- a/app/sheet-editor/sheet-editor-button.c
++++ b/app/sheet-editor/sheet-editor-button.c
+@@ -24,8 +24,6 @@
+ 
+ #include <glib/gi18n-lib.h>
+ 
+-#include <xpm-pixbuf.h>
+-
+ #include "sheet-editor-button.h"
+ #include "widgets.h"
+ #include "message.h"
+@@ -79,7 +77,7 @@ get_object_pixbuf (SheetObject *so)
+     if (g_str_has_prefix ((char *) so->pixmap, "res:")) {
+       pixbuf = pixbuf_from_resource (((char *) so->pixmap) + 4);
+     } else {
+-      pixbuf = xpm_pixbuf_load (so->pixmap);
++      pixbuf = gdk_pixbuf_new_from_xpm_data ((const char **) so->pixmap);
+     }
+   } else {
+     if (so->pixmap_file != NULL) {
+--- a/app/toolbox.c
++++ b/app/toolbox.c
+@@ -21,9 +21,6 @@
+ #include <glib/gi18n-lib.h>
+ 
+ #include <gtk/gtk.h>
+-
+-#include <xpm-pixbuf.h>
+-
+ #include "gtkwrapbox.h"
+ #include "gtkhwrapbox.h"
+ 
+@@ -305,7 +302,7 @@ fill_sheet_wbox(Sheet *sheet)
+       if (g_str_has_prefix ((const char *) sheet_obj->pixmap, "res:")) {
+         pixbuf = pixbuf_from_resource ((const char *) sheet_obj->pixmap + 4);
+       } else {
+-        pixbuf = xpm_pixbuf_load (sheet_obj->pixmap);
++        pixbuf = gdk_pixbuf_new_from_xpm_data (sheet_obj->pixmap);
+         if (pixbuf == NULL) {
+           g_warning ("Problem loading icon for ā€˜%s’", sheet_obj->description);
+           pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+@@ -334,7 +331,7 @@ fill_sheet_wbox(Sheet *sheet)
+           pixbuf = cropped;
+         }
+       } else {
+-        pixbuf = xpm_pixbuf_load (missing);
++        pixbuf = gdk_pixbuf_new_from_xpm_data (missing);
+ 
+         message_warning ("failed to load icon for file\n %s\n cause=%s",
+                          sheet_obj->pixmap_file,
+@@ -342,8 +339,8 @@ fill_sheet_wbox(Sheet *sheet)
+       }
+     } else {
+       DiaObjectType *type;
+-      type = object_get_type (sheet_obj->object_type);
+-      pixbuf = dia_object_type_get_icon (type);
++      type = object_get_type(sheet_obj->object_type);
++      pixbuf = gdk_pixbuf_new_from_xpm_data (type->pixmap);
+     }
+ 
+     if (pixbuf) {
+--- a/lib/meson.build
++++ b/lib/meson.build
+@@ -230,7 +230,6 @@ libdia_deps = [
+     libm_dep,
+     gmodule_dep,
+     graphene_dep,
+-    xpm_dep,
+ ]
+ 
+ libdia_inc = include_directories('.')
+--- a/lib/object.c
++++ b/lib/object.c
+@@ -23,8 +23,6 @@
+ #include <stdio.h>
+ #include <string.h>
+ 
+-#include <xpm-pixbuf.h>
+-
+ #define _DIA_OBJECT_BUILD 1
+ #include "object.h"
+ #include "diagramdata.h" /* for Layer */
+@@ -1425,6 +1423,14 @@ dia_object_type_get_icon (const DiaObjectType *type)
+ 
+   if (g_str_has_prefix ((char *) icon_data, "res:")) {
+     pixbuf = pixbuf_from_resource (((char *) icon_data) + 4);
++  } else if (icon_data && strncmp ((char *) icon_data, "GdkP", 4) == 0) {
++    /* GTK3: We will remove this in Dia 2.0 but is retained to maintain
++     * compatability with 0.97.3 objects */
++    g_warning ("Object '%s' has an inline icon, this is deprecated",
++               type->name);
++    G_GNUC_BEGIN_IGNORE_DEPRECATIONS
++    pixbuf = gdk_pixbuf_new_from_inline (-1, (guint8 *) icon_data, TRUE, 
NULL);
++    G_GNUC_END_IGNORE_DEPRECATIONS
+   } else if (type->pixmap_file != NULL) {
+     GError *error = NULL;
+     pixbuf = gdk_pixbuf_new_from_file (type->pixmap_file, &error);
+@@ -1433,7 +1439,8 @@ dia_object_type_get_icon (const DiaObjectType *type)
+       g_clear_error (&error);
+     }
+   } else {
+-    pixbuf = xpm_pixbuf_load (icon_data);
++    const char **pixmap_data = icon_data;
++    pixbuf = gdk_pixbuf_new_from_xpm_data (pixmap_data);
+   }
+ 
+   return pixbuf;
+--- a/meson.build
++++ b/meson.build
+@@ -22,7 +22,6 @@ libxml_dep  = dependency('libxml-2.0', version: '>= 2.14.0')
+ gmodule_dep = dependency('gmodule-2.0')
+ libcairo_dep = dependency('cairo')
+ graphene_dep = dependency('graphene-1.0', version: '>= 1.10')
+-xpm_dep = dependency('xpm-pixbuf')
+ 
+ # Not required since not all platforms ship a separate libm.
+ libm_dep = cc.find_library('m', required: false)

diff --git a/app-office/dia/files/dia-0.98-use_gtkfontbutton.patch 
b/app-office/dia/files/dia-0.98-use_gtkfontbutton.patch
new file mode 100644
index 000000000000..5a07f6b7277f
--- /dev/null
+++ b/app-office/dia/files/dia-0.98-use_gtkfontbutton.patch
@@ -0,0 +1,496 @@
+https://salsa.debian.org/debian/dia/-/blob/debian/0.98+git20250827-2/debian/patches/use-gtkfontbutton.patch
+Origin: https://gitlab.gnome.org/GNOME/dia/-/merge_requests/114
+This patch changes the custom font-selector window by a GtkFontButton widget.
+Fix the custom font-selector window which is very long to load.
+--- a/lib/font.c
++++ b/lib/font.c
+@@ -39,6 +39,7 @@
+ #include "font.h"
+ #include "message.h"
+ #include "textline.h"
++#include "units.h"
+ 
+ static PangoContext *pango_context = NULL;
+ 
+@@ -53,13 +54,6 @@ struct _DiaFont {
+   PangoFontDescription *pfd;
+   /* mutable */ char *legacy_name;
+ 
+-  /* there is a difference between Pango's font size and Dia's font height */
+-  /* Calculated  font_size is to make 'font_height = ascent + descent */
+-  /* The font_height is used as default line height, there used to be a 
hard-coded size = 0.7 * height  */
+-  /* before using pango_set_absolute_size() to overcome font size differences 
between renderers */
+-  double height;
+-  /* Need to load a font to query it's metrics */
+-  PangoFont *loaded;
+   PangoFontMetrics *metrics;
+ };
+ 
+@@ -136,8 +130,6 @@ dia_font_finalize (GObject *object)
+   g_clear_pointer (&font->pfd, pango_font_description_free);
+   g_clear_pointer (&font->metrics, pango_font_metrics_unref);
+ 
+-  g_clear_object (&font->loaded);
+-
+   G_OBJECT_CLASS (dia_font_parent_class)->finalize (object);
+ }
+ 
+@@ -166,33 +158,17 @@ dia_pfd_set_height(PangoFontDescription *pfd, double 
height)
+ }
+ 
+ 
+-/*!
+- * In Dia a font is usually referred to by it's (line-) height, not it's size.
+- *
+- * This methods "calculates" the latter from the former. This used to be some 
magic factor of 0.7 which did not
+- * solve the resolution dependencance of the former calculation. In fact 
there is new magic factor now because
+- * really calculating the font size from the height would involve two font 
loads which seem to be two expensive.
+- */
+ static void
+-_dia_font_adjust_size (DiaFont *font, double height, gboolean recalc_alwways)
++dia_font_update_metrics (DiaFont *font)
+ {
++  PangoFont *loaded;
+ 
+-  if (font->height != height || !font->metrics || recalc_alwways) {
+-    PangoFont *loaded;
+-
+-    dia_pfd_set_height (font->pfd, height);
+-    /* need to load a font to get it's metrics */
+-    loaded = font->loaded;
+-    font->loaded = pango_context_load_font (dia_font_get_context (), 
font->pfd);
+-
+-    g_clear_object (&loaded);
+-
+-    g_clear_pointer (&font->metrics, pango_font_metrics_unref);
++  g_clear_pointer (&font->metrics, pango_font_metrics_unref);
+ 
+-    /* caching metrics */
+-    font->metrics = pango_font_get_metrics (font->loaded, NULL);
+-    font->height = height;
+-  }
++  /* need to load a font to get its metrics */
++  loaded = pango_context_load_font (dia_font_get_context (), font->pfd);
++  font->metrics = pango_font_get_metrics (loaded, NULL);
++  g_clear_object (&loaded);
+ }
+ 
+ 
+@@ -205,15 +181,8 @@ DiaFont *
+ dia_font_new (const char *family, DiaFontStyle style, double height)
+ {
+   DiaFont* font = dia_font_new_from_style(style, height);
+-  gboolean changed;
+-
+-  changed = family != NULL && g_strcmp0 (pango_font_description_get_family 
(font->pfd), family) != 0;
+   pango_font_description_set_family(font->pfd, family);
+ 
+-  if (changed) {
+-    _dia_font_adjust_size (font, font->height, TRUE);
+-  }
+-
+   return font;
+ }
+ 
+@@ -316,9 +285,31 @@ dia_font_new_from_style (DiaFontStyle style, double 
height)
+ 
+   retval = g_object_new (DIA_TYPE_FONT, NULL);
+   retval->pfd = pfd;
+-  _dia_font_adjust_size (retval, height, FALSE);
+   retval->legacy_name = NULL;
+ 
++  dia_font_update_metrics (retval);
++
++  return retval;
++}
++
++
++DiaFont *
++dia_font_new_from_description (const char *desc)
++{
++  DiaFont *retval;
++  PangoFontDescription *pfd = pango_font_description_from_string (desc);
++
++  if (!pango_font_description_get_size_is_absolute (pfd)) {
++    double size = pango_font_description_get_size (pfd);
++    pango_font_description_set_absolute_size(pfd, size * global_zoom_factor * 
72.0);
++  }
++
++  retval = g_object_new (DIA_TYPE_FONT, NULL);
++  retval->pfd = pfd;
++  retval->legacy_name = NULL;
++
++  dia_font_update_metrics (retval);
++
+   return retval;
+ }
+ 
+@@ -407,8 +398,9 @@ double
+ dia_font_get_height (DiaFont *font)
+ {
+   g_return_val_if_fail (font != NULL, 0.0);
++  g_return_val_if_fail (pango_font_description_get_size_is_absolute 
(font->pfd), 0.0);
+ 
+-  return font->height;
++  return pdu_to_dcm(pango_font_description_get_size(font->pfd)) / 0.8;
+ }
+ 
+ 
+@@ -430,6 +422,23 @@ dia_font_get_size (DiaFont *font)
+ }
+ 
+ 
++/**
++ * dia_font_set_size:
++ * @font: The font to modify.
++ * @size: The new size in centimetres.
++ *
++ * Sets the size of font to the provided (positive) size.
++ */
++void
++dia_font_set_size (DiaFont *font, double size)
++{
++  g_return_if_fail (size >= 0);
++
++  pango_font_description_set_absolute_size (font->pfd, dcm_to_pdu (size));
++  dia_font_update_metrics (font);
++}
++
++
+ /**
+  * dia_font_set_height:
+  *
+@@ -438,7 +447,8 @@ dia_font_get_size (DiaFont *font)
+ void
+ dia_font_set_height (DiaFont* font, double height)
+ {
+-  _dia_font_adjust_size (font, height, FALSE);
++  /* FIXME For now, assume height is 80% of size. */
++  dia_font_set_size (font, height / 0.8);
+ }
+ 
+ 
+@@ -493,7 +503,7 @@ dia_font_set_any_family (DiaFont *font, const char *family)
+   pango_font_description_set_family (font->pfd, family);
+   if (changed) {
+     /* force recalculation on name change */
+-    _dia_font_adjust_size (font, font->height, TRUE);
++    dia_font_update_metrics (font);
+   }
+ 
+   g_clear_pointer (&font->legacy_name, g_free);
+@@ -531,7 +541,7 @@ dia_font_set_weight (DiaFont *font, DiaFontWeight weight)
+   dia_pfd_set_weight(font->pfd,weight);
+ 
+   if (old_weight != weight) {
+-    _dia_font_adjust_size (font, font->height, TRUE);
++    dia_font_update_metrics (font);
+   }
+ }
+ 
+@@ -548,7 +558,7 @@ dia_font_set_slant (DiaFont *font, DiaFontSlant slant)
+   g_return_if_fail(font != NULL);
+   dia_pfd_set_slant(font->pfd,slant);
+   if (slant != old_slant)
+-    _dia_font_adjust_size (font, font->height, TRUE);
++    dia_font_update_metrics (font);
+ }
+ 
+ 
+@@ -702,7 +712,8 @@ dia_font_ascent (const char *string, DiaFont *font, double 
height)
+ {
+   if (font->metrics) {
+     double ascent = pdu_to_dcm (pango_font_metrics_get_ascent 
(font->metrics));
+-    return ascent * (height / font->height);
++    double factor = height / dia_font_get_height (font);
++    return ascent * factor;
+   } else {
+     /* previous, _expensive_ but string specific way */
+     TextLine *text_line = text_line_new (string, font, height);
+@@ -723,7 +734,8 @@ dia_font_descent (const char *string, DiaFont *font, 
double height)
+ {
+   if (font->metrics) {
+     double descent = pdu_to_dcm (pango_font_metrics_get_descent 
(font->metrics));
+-    return descent * (height / font->height);
++    double factor = height / dia_font_get_height (font);
++    return descent * factor;
+   } else {
+     /* previous, _expensive_ but string specific way */
+     TextLine *text_line = text_line_new (string, font, height);
+--- a/lib/font.h
++++ b/lib/font.h
+@@ -95,6 +95,7 @@ DiaFont                    *dia_font_new                    
(const char       *f
+ DiaFont                    *dia_font_new_from_style         (DiaFontStyle     
 style,
+                                                              double           
 height);
+ DiaFont                    *dia_font_new_from_legacy_name   (const char       
*name);
++DiaFont                    *dia_font_new_from_description   (const char       
*description);
+ const char                 *dia_font_get_legacy_name        (DiaFont          
*font);
+ DiaFont                    *dia_font_copy                   (DiaFont          
*font);
+ DiaFontStyle                dia_font_get_style              (DiaFont          
*font);
+@@ -103,6 +104,8 @@ const PangoFontDescription *dia_font_get_description       
 (DiaFont          *f
+ double                      dia_font_get_height             (DiaFont          
*font);
+ void                        dia_font_set_height             (DiaFont          
*font,
+                                                              double           
 height);
++void                        dia_font_set_size               (DiaFont          
*font,
++                                                             double           
 size);
+ double                      dia_font_get_size               (DiaFont          
*font);
+ void                        dia_font_set_slant              (DiaFont          
*font,
+                                                              DiaFontSlant     
 slant);
+--- a/lib/libdia.def
++++ b/lib/libdia.def
+@@ -241,8 +241,10 @@ EXPORTS
+  dia_font_new
+  dia_font_new_from_legacy_name
+  dia_font_new_from_style
++ dia_font_new_from_description
+  dia_font_set_any_family
+  dia_font_set_height
++ dia_font_set_size
+  dia_font_set_slant
+  dia_font_set_slant_from_string
+  dia_font_set_weight
+@@ -250,11 +252,6 @@ EXPORTS
+  dia_font_copy
+  dia_font_string_width
+ 
+- dia_font_selector_get_font
+- dia_font_selector_get_type
+- dia_font_selector_new
+- dia_font_selector_set_font
+-
+  dia_guide_new
+  dia_guide_copy
+  dia_guide_free
+--- a/lib/meson.build
++++ b/lib/meson.build
+@@ -167,8 +167,6 @@ libdia_sources = stdprop_sources + [
+     'dia-colour-cell-renderer.h',
+     'dia-colour-selector.c',
+     'dia-colour-selector.h',
+-    'dia-font-selector.c',
+-    'dia-font-selector.h',
+     'dia-graphene.h',
+     'dia-guide.c',
+     'dia-guide.h',
+--- a/lib/prop_attr.c
++++ b/lib/prop_attr.c
+@@ -29,11 +29,11 @@
+ 
+ #include <gtk/gtk.h>
+ #include "dia_xml.h"
++#include "font.h"
+ #include "properties.h"
+ #include "propinternals.h"
+ #include "dia-arrow-selector.h"
+ #include "dia-colour-selector.h"
+-#include "dia-font-selector.h"
+ #include "dia-line-style-selector.h"
+ 
+ /***************************/
+@@ -421,22 +421,27 @@ fontprop_copy(FontProperty *src)
+ static WIDGET *
+ fontprop_get_widget(FontProperty *prop, PropDialog *dialog)
+ {
+-  GtkWidget *ret = dia_font_selector_new();
+-  prophandler_connect(&prop->common, G_OBJECT(ret), "value-changed");
++  GtkWidget *ret = gtk_font_button_new();
++  gtk_font_chooser_set_level (GTK_FONT_CHOOSER (ret), 
GTK_FONT_CHOOSER_LEVEL_FAMILY | GTK_FONT_CHOOSER_LEVEL_STYLE);
++  prophandler_connect(&prop->common, G_OBJECT(ret), "font-set");
+   return ret;
+ }
+ 
+ static void
+ fontprop_reset_widget(FontProperty *prop, WIDGET *widget)
+ {
+-  dia_font_selector_set_font (DIA_FONT_SELECTOR (widget),
+-                              prop->font_data);
++  const PangoFontDescription *desc = dia_font_get_description 
(prop->font_data);
++  gtk_font_chooser_set_font_desc (GTK_FONT_CHOOSER (widget), desc);
+ }
+ 
+ static void
+ fontprop_set_from_widget(FontProperty *prop, WIDGET *widget)
+ {
+-  prop->font_data = dia_font_selector_get_font (DIA_FONT_SELECTOR (widget));
++  char *desc = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (widget));
++  DiaFont *new_font = dia_font_new_from_description (desc);
++
++  g_clear_pointer (&desc, g_free);
++  g_set_object (&prop->font_data, new_font);
+ }
+ 
+ static void
+--- a/lib/prop_text.c
++++ b/lib/prop_text.c
+@@ -125,6 +125,7 @@ multistringprop_get_widget(StringProperty *prop, 
PropDialog *dialog)
+   GtkWidget *ret = gtk_text_view_new();
+   GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(ret));
+   GtkWidget *frame = gtk_frame_new(NULL);
++  gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (ret), FALSE);
+   gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
+   gtk_container_add(GTK_CONTAINER(frame), ret);
+   g_signal_connect(G_OBJECT(ret), "key-release-event",
+--- a/objects/UML/class_attributes_dialog.c
++++ b/objects/UML/class_attributes_dialog.c
+@@ -729,6 +729,7 @@ _attributes_create_page (GtkNotebook *notebook, UMLClass 
*umlclass)
+   gtk_container_add (GTK_CONTAINER (scrolledwindow), entry);
+   gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (entry), GTK_WRAP_WORD);
+   gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (entry), TRUE);
++  gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (entry), FALSE);
+   gtk_widget_show (entry);
+ #if 0 /* while the GtkEntry has a "activate" signal, GtkTextView does not.
+        * Maybe we should connect to "set-focus-child" instead?
+--- a/objects/UML/class_dialog.c
++++ b/objects/UML/class_dialog.c
+@@ -40,6 +40,7 @@
+ #include <math.h>
+ #include <string.h>
+ 
++#include "font.h"
+ #include "object.h"
+ #include "class.h"
+ #include "diaoptionmenu.h"
+@@ -196,6 +197,28 @@ _class_set_comment (GtkTextView *view, gchar *text)
+ }
+ 
+ 
++static DiaFont *
++_font_from_button (GtkFontButton *btn)
++{
++  char *font_desc;
++  DiaFont *ret;
++
++  font_desc = gtk_font_chooser_get_font (GTK_FONT_CHOOSER (btn));
++  ret = dia_font_new_from_description (font_desc);
++  g_clear_pointer (&font_desc, g_free);
++
++  return ret;
++}
++
++
++static void
++_set_selector_font (GtkFontButton *btn, DiaFont *font)
++{
++  gtk_font_chooser_set_font_desc (GTK_FONT_CHOOSER (btn),
++                                  dia_font_get_description (font));
++}
++
++
+ static void
+ class_read_from_dialog(UMLClass *umlclass, UMLClassDialog *prop_dialog)
+ {
+@@ -243,12 +266,12 @@ class_read_from_dialog(UMLClass *umlclass, 
UMLClassDialog *prop_dialog)
+   dia_colour_selector_get_colour (DIA_COLOUR_SELECTOR 
(prop_dialog->fill_color),
+                                   &umlclass->fill_color);
+ 
+-  umlclass->normal_font = dia_font_selector_get_font 
(prop_dialog->normal_font);
+-  umlclass->polymorphic_font = dia_font_selector_get_font 
(prop_dialog->polymorphic_font);
+-  umlclass->abstract_font = dia_font_selector_get_font 
(prop_dialog->abstract_font);
+-  umlclass->classname_font = dia_font_selector_get_font 
(prop_dialog->classname_font);
+-  umlclass->abstract_classname_font = dia_font_selector_get_font 
(prop_dialog->abstract_classname_font);
+-  umlclass->comment_font = dia_font_selector_get_font 
(prop_dialog->comment_font);
++  umlclass->normal_font = _font_from_button(prop_dialog->normal_font);
++  umlclass->polymorphic_font = 
_font_from_button(prop_dialog->polymorphic_font);
++  umlclass->abstract_font = _font_from_button(prop_dialog->abstract_font);
++  umlclass->classname_font = _font_from_button (prop_dialog->classname_font);
++  umlclass->abstract_classname_font = _font_from_button 
(prop_dialog->abstract_classname_font);
++  umlclass->comment_font = _font_from_button (prop_dialog->comment_font);
+ 
+   umlclass->font_height = gtk_spin_button_get_value 
(prop_dialog->normal_font_height);
+   umlclass->abstract_font_height = gtk_spin_button_get_value 
(prop_dialog->abstract_font_height);
+@@ -291,12 +314,12 @@ class_fill_in_dialog(UMLClass *umlclass)
+   dia_colour_selector_set_colour (prop_dialog->text_color, 
&umlclass->text_color);
+   dia_colour_selector_set_colour (prop_dialog->line_color, 
&umlclass->line_color);
+   dia_colour_selector_set_colour (prop_dialog->fill_color, 
&umlclass->fill_color);
+-  dia_font_selector_set_font (prop_dialog->normal_font, 
umlclass->normal_font);
+-  dia_font_selector_set_font (prop_dialog->polymorphic_font, 
umlclass->polymorphic_font);
+-  dia_font_selector_set_font (prop_dialog->abstract_font, 
umlclass->abstract_font);
+-  dia_font_selector_set_font (prop_dialog->classname_font, 
umlclass->classname_font);
+-  dia_font_selector_set_font (prop_dialog->abstract_classname_font, 
umlclass->abstract_classname_font);
+-  dia_font_selector_set_font (prop_dialog->comment_font, 
umlclass->comment_font);
++  _set_selector_font (prop_dialog->normal_font, umlclass->normal_font);
++  _set_selector_font (prop_dialog->polymorphic_font, 
umlclass->polymorphic_font);
++  _set_selector_font (prop_dialog->abstract_font, umlclass->abstract_font);
++  _set_selector_font (prop_dialog->classname_font, umlclass->classname_font);
++  _set_selector_font (prop_dialog->abstract_classname_font, 
umlclass->abstract_classname_font);
++  _set_selector_font (prop_dialog->comment_font, umlclass->comment_font);
+   gtk_spin_button_set_value (prop_dialog->normal_font_height, 
umlclass->font_height);
+   gtk_spin_button_set_value (prop_dialog->polymorphic_font_height, 
umlclass->polymorphic_font_height);
+   gtk_spin_button_set_value (prop_dialog->abstract_font_height, 
umlclass->abstract_font_height);
+@@ -311,7 +334,7 @@ create_font_props_row (GtkGrid    *grid,
+                        gint        row,
+                        DiaFont    *font,
+                        real        height,
+-                       DiaFontSelector **fontsel,
++                       GtkFontButton   **fontsel,
+                        GtkSpinButton   **heightsel)
+ {
+   GtkWidget *label;
+@@ -320,9 +343,10 @@ create_font_props_row (GtkGrid    *grid,
+   label = gtk_label_new (kind);
+   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+   gtk_grid_attach (grid, label, 0, row, 1, 1);
+-  *fontsel = DIA_FONT_SELECTOR (dia_font_selector_new ());
++  *fontsel = GTK_FONT_BUTTON (gtk_font_button_new ());
+   gtk_widget_set_hexpand (GTK_WIDGET (*fontsel), TRUE);
+-  dia_font_selector_set_font (DIA_FONT_SELECTOR (*fontsel), font);
++  gtk_font_chooser_set_font_desc (GTK_FONT_CHOOSER (*fontsel), 
dia_font_get_description (font));
++  gtk_font_chooser_set_level (GTK_FONT_CHOOSER (*fontsel), 
GTK_FONT_CHOOSER_LEVEL_FAMILY | GTK_FONT_CHOOSER_LEVEL_STYLE);
+   gtk_grid_attach (GTK_GRID (grid), GTK_WIDGET(*fontsel), 1, row, 1, 1);
+ 
+   adj = GTK_ADJUSTMENT (gtk_adjustment_new (height, 0.1, 10.0, 0.1, 1.0, 0));
+@@ -382,6 +406,7 @@ class_create_page(GtkNotebook *notebook,  UMLClass 
*umlclass)
+   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow),
+                                      GTK_SHADOW_IN);
+   entry = gtk_text_view_new ();
++  gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (entry), FALSE);
+   prop_dialog->comment = GTK_TEXT_VIEW(entry);
+   gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (entry), GTK_WRAP_WORD);
+ 
+--- a/objects/UML/class_dialog.h
++++ b/objects/UML/class_dialog.h
+@@ -1,7 +1,6 @@
+ #pragma once
+ 
+ #include "dia-colour-selector.h"
+-#include "dia-font-selector.h"
+ 
+ G_BEGIN_DECLS
+ 
+@@ -32,12 +31,12 @@ struct _UMLClassDialog {
+   GtkToggleButton *op_supp;
+   GtkToggleButton *comments_vis;
+   GtkToggleButton *op_wrap;
+-  DiaFontSelector *normal_font;
+-  DiaFontSelector *abstract_font;
+-  DiaFontSelector *polymorphic_font;
+-  DiaFontSelector *classname_font;
+-  DiaFontSelector *abstract_classname_font;
+-  DiaFontSelector *comment_font;
++  GtkFontButton *normal_font;
++  GtkFontButton *abstract_font;
++  GtkFontButton *polymorphic_font;
++  GtkFontButton *classname_font;
++  GtkFontButton *abstract_classname_font;
++  GtkFontButton *comment_font;
+   GtkSpinButton *normal_font_height;
+   GtkSpinButton *abstract_font_height;
+   GtkSpinButton *polymorphic_font_height;
+--- a/objects/UML/class_operations_dialog.c
++++ b/objects/UML/class_operations_dialog.c
+@@ -982,6 +982,7 @@ operations_data_create_hbox (UMLClass *umlclass)
+   gtk_container_add (GTK_CONTAINER (scrolledwindow), entry);
+   gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (entry), GTK_WRAP_WORD);
+   gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (entry),TRUE);
++  gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (entry), FALSE);
+ 
+ 
+   gtk_grid_attach (GTK_GRID (grid), label, 4, 0, 1, 1);
+@@ -1340,6 +1341,7 @@ operations_parameters_data_create_vbox (UMLClass 
*umlclass)
+   gtk_container_add (GTK_CONTAINER (scrolledwindow), entry);
+   gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (entry), GTK_WRAP_WORD);
+   gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (entry),TRUE);
++  gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (entry), FALSE);
+ 
+   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+   gtk_grid_attach (GTK_GRID (grid), label, 2, 1, 1, 1);

diff --git a/app-office/dia/files/dia-2004-11-26.1 
b/app-office/dia/files/dia-2004-11-26.1
new file mode 100644
index 000000000000..5510caa9a74f
--- /dev/null
+++ b/app-office/dia/files/dia-2004-11-26.1
@@ -0,0 +1,460 @@
+'\" t
+.\"     Title: dia
+.\"    Author: Fredrik Hallenberg <[email protected]>
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\"      Date: 2004-11-26
+.\"    Manual: [FIXME: manual]
+.\"    Source: [FIXME: source]
+.\"  Language: English
+.\"
+.TH "DIA" "1" "2004\-11\-26" "[FIXME: source]" "[FIXME: manual]"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el       .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+dia \- a diagram drawing program
+.SH "SYNOPSIS"
+.HP \w'\fBdia\fR\ 'u
+\fBdia\fR [\fB\-c\fR] [\fB\-\-credits\fR] [\fB\-e\ \fR\fB\fIOUTPUT\fR\fR] 
[\fB\-\-export=\fR\fB\fIOUTPUT\fR\fR] [\fB\-L\ 
\fR\fB\fILAYER,LAYER,\&.\&.\&.\fR\fR] 
[\fB\-\-show\-layers=\fR\fB\fILAYER,LAYER,\&.\&.\&.\fR\fR] [\fB\-h\fR] 
[\fB\-\-help\fR] [\fB\-n\fR] [\fB\-\-nosplash\fR] [\fB\-s\ \fR\fB\fIWxH\fR\fR] 
[\fB\-\-size=\fR\fB\fIWxH\fR\fR] [\fB\-t\ \fR\fB\fIFORMAT\fR\fR] 
[\fB\-\-filter=\fR\fB\fITYPE\fR\fR] [\fB\-v\fR] [\fB\-\-version\fR] [file\ 
\&.\&.\&.]
+.SH "DESCRIPTION"
+.PP
+\fBDia\fR
+is used to create diagrams\&. Dia has a number of basic tools, like lines and 
boxes but can also dynamically load
+\fIsheets\fR\&. A sheet is a collection of tools that are used in a certain 
type of diagram\&.
+.PP
+Most diagram objects in
+\fBDia\fR
+have
+\fIconnection points\fR\&. Lines can be connected to these connection points 
and this way graph structures can be formed\&. When objects are moved or 
resized the connections will follow the objects\&.
+.PP
+Diagrams drawn in
+\fBDia\fR
+can be exported to various formats\&.
+.SH "OPTIONS"
+.PP
+\fBDia\fR
+accepts the following options:
+.PP
+\fB\-c\fR \fB\-\-credits\fR
+.RS 4
+Display credits list and exit\&.
+.RE
+.PP
+\fB\-e \fR\fB\fIOUTPUT\fR\fR \fB\-\-export=\fR\fB\fIOUTPUT\fR\fR
+.RS 4
+Export loaded file to OUTPUT and exit\&.
+.RE
+.PP
+\fB\-h\fR \fB\-\-help\fR
+.RS 4
+Display a list of all commandline options\&.
+.RE
+.PP
+\fB\-n\fR \fB\-\-nosplash\fR
+.RS 4
+Do not show the splash screen\&.
+.RE
+.PP
+\fB\-s \fR\fB\fIWxH\fR\fR \fB\-\-size=\fR\fB\fIWxH\fR\fR
+.RS 4
+Export loaded file in decimal given width and/or height\&. It is allowed to 
only select width or height\&. E\&.g\&.
+\fB\-\-size=\fR\fB\fI520x\fR\fR
+exports an image that is 520 pixels wide, while
+\fB\-\-size=\fR\fB\fIx900\fR\fR
+exports an image of 900 pixels height\&.
+.if n \{\
+.sp
+.\}
+.RS 4
+.it 1 an-trap
+.nr an-no-space-flag 1
+.nr an-break-flag 1
+.br
+.ps +1
+\fBNote\fR
+.ps -1
+.br
+This option is currently only implemented for the PNG export filter\&.
+.sp .5v
+.RE
+.RE
+.PP
+\fB\-L \fR\fB\fILAYER,LAYER,\&.\&.\&.\fR\fR 
\fB\-\-show\-layers=\fR\fB\fILAYER,LAYER,\&.\&.\&.\fR\fR
+.RS 4
+Only include specified layers when exporting\&. Layers can be specified either 
as a layer name, the layer number or a numeric range X\-Y of layers\&. 
\-\-show\-layers=background,2\-5 shows the layer named background and layers 
2\-5, \-\-show\-layers=2\- shows layers 2 and up\&.
+.RE
+.PP
+\fB\-t \fR\fB\fITYPE\fR\fR \fB\-\-filter=\fR\fB\fITYPE\fR\fR
+.RS 4
+Export loaded file with TYPE and exit\&. Formats and variants are described 
below\&.
+.RE
+.PP
+\fB\-\-list\-filters\fR
+.RS 4
+List export filters/formats and exit\&.
+.RE
+.PP
+\fB\-v\fR \fB\-\-version\fR
+.RS 4
+Display
+\fBdia\fR
+version and exit\&.
+.RE
+.SH "EXPORT FORMATS"
+.PP
+The following export formats are supported by
+\fBdia\fR\&. Most formats are implemented by plug\-ins so their availability 
depends on compile\- and runtime\-configuration\&.
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+cgm
+(Computer Graphics Metafile, ISO 8632)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+dia
+(Native dia diagram)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+dxf
+(Drawing Interchange File)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+eps
+or
+eps\-builtin
+or
+eps\-pango
+(Encapsulated PostScript)
+.sp
+The format specifications
+eps
+and
+eps\-pango
+both use the font renderer of the Pango library, while
+eps\-builtin
+uses a dia specific font renderer\&. If you have problems with Pango 
rendering, e\&.g\&. Unicode, try
+eps\-builtin
+instead\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+fig
+(XFig format)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+mp
+(TeX MetaPost macros)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+pdf
+(Portable Document Format)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+plt
+or
+hpgl
+(HP Graphics Language)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+png
+(Portable Network Graphics)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+shape
+(Dia Shape File)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+svg
+(Scalable Vector Graphics)
+.sp
+There are three different SVG exporters with Dia having different 
specializations\&.
+cairo\-svg
+is turning text to shapes to become independent of font availability on the 
target system\&.
+dia\-svg
+is based on Dia core code only\&. It\*(Aqs translating all Dia\*(Aqs rendering 
capabilities as closely as possible to SVG\&.
+svg\-py
+\- as SVG renderer implemented in Python \- is producing plain SVG\&. It is 
the most hackable version to allow some user adaptions
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+pstricks\-tex
+(TeX PSTricks macros)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+pgf\-tex
+(TeX PGF/tikz macros)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+vdx
+(Visio Diagram XML)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+wpg
+(WordPerfect Graphics)
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+wmf
+(Windows MetaFile)
+.RE
+.SH "FILES"
+.PP
+\fBdia\fR
+creates a directory
+\&.dia
+in the user\*(Aqs home, which contains different files to store user 
preferences\&. To reset
+\fBdia\fR
+to it\*(Aqs default behaviour, just remove the respective file:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+defaults\&.dia: contains default values for elements (XML format)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+diarc: keeps
+\fBdia\fR
+preferences (ASCII)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+history: keeps the list of last edited diagrams (ASCII)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+menurc: contains an automated accelerator map dump (Lisp)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+persistence: contains GUI information, e\&.g\&. open windows (XML)\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+pluginrc: the list of loaded plugins (XML)\&.
+.RE
+.SH "SEE ALSO"
+.PP
+\m[blue]\fBPango\fR\m[]\&\s-2\u[1]\d\s+2
+.PP
+X (1)
+.PP
+xfig (1)
+.PP
+inkscape (1)
+.SH "COPYRIGHT"
+.PP
+Copyright 1999 Alexander Larsson\&.
+.PP
+Permission to use, copy, modify, and distribute this software and its 
documentation for any purpose and without fee is hereby granted, provided that 
the above copyright notice appear in all copies and that both that copyright 
notice and this permission notice appear in supporting documentation\&.
+.SH "AUTHORS"
+.PP
+Alexander Larsson
+.PP
+This manual was written by
+Fredrik Hallenberg\&.
+.SH "AUTHORS"
+.PP
+\fBFredrik Hallenberg\fR <\&hallon@lysator\&.liu\&.se\&>
+.RS 4
+Author.
+.RE
+.PP
+\fBW\&. Borgert\fR <\&debacle@debian\&.org\&>
+.RS 4
+Author.
+.RE
+.PP
+\fBAlan Horkan\fR <\&horkana@tcd\&.ie\&>
+.RS 4
+Author.
+.RE
+.SH "COPYRIGHT"
+.br
+Copyright \(co 1999, 2004 Fredrik Hallenberg, W. Borgert, Alan Horkan
+.br
+.SH "NOTES"
+.IP " 1." 4
+Pango
+.RS 4
+\%http://www.pango.org/
+.RE

diff --git a/app-office/dia/metadata.xml b/app-office/dia/metadata.xml
index 595bd9c2d63f..21f43cf36fa2 100644
--- a/app-office/dia/metadata.xml
+++ b/app-office/dia/metadata.xml
@@ -13,6 +13,9 @@
     possible to add support for new shapes by writing simple XML
     files, using a subset of SVG to draw the shape.
   </longdescription>
+  <use>
+    <flag name="xslt">Enable the plugin for xslt</flag>
+  </use>
   <upstream>
     <remote-id type="gnome-gitlab">GNOME/dia</remote-id>
   </upstream>


Reply via email to