diff options
author | heavysink | 2022-10-31 15:37:23 -0400 |
---|---|---|
committer | heavysink | 2022-10-31 15:37:23 -0400 |
commit | a381c76c6c93a7811e2cb537cbdf512d2d6ba4a6 (patch) | |
tree | f60d3a62bf209dd06f807be21e943d3572b669be | |
parent | b25a965b738ca9008871675367f85589239a9e06 (diff) | |
download | aur-a381c76c6c93a7811e2cb537cbdf512d2d6ba4a6.tar.gz |
Update with new patch
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 2 | ||||
-rw-r--r-- | pdf-import.patch | 53 |
3 files changed, 39 insertions, 18 deletions
@@ -1,7 +1,7 @@ pkgbase = dia-git pkgdesc = A GTK+ based diagram creation program (GIT VERSION) pkgver = 6672.4cd048d43 - pkgrel = 2 + pkgrel = 3 url = http://live.gnome.org/Dia arch = x86_64 license = GPL @@ -6,7 +6,7 @@ pkgname=dia-git _pkgname=dia pkgver=6672.4cd048d43 -pkgrel=2 +pkgrel=3 pkgdesc="A GTK+ based diagram creation program (GIT VERSION)" arch=('x86_64') license=('GPL') diff --git a/pdf-import.patch b/pdf-import.patch index f729a845e194..3793a53b0953 100644 --- a/pdf-import.patch +++ b/pdf-import.patch @@ -1,6 +1,26 @@ ---- plug-ins/pdf/pdf-import.cpp 2022-03-12 08:17:49.242369295 +0800 -+++ plug-ins/pdf/pdf-import.cpp 2022-03-12 08:19:04.302435181 +0800 -@@ -318,10 +318,10 @@ +--- plug-ins/pdf/pdf-import.cpp 2022-05-25 17:35:28.000000000 +0200 ++++ plug-ins/pdf/pdf-import.cpp 2022-09-27 20:25:47.183817900 +0200 +@@ -152,13 +152,12 @@ + void + updateLineDash (GfxState *state) + { +- double *dashPattern; +- int dashLength; +- double dashStart; +- +- state->getLineDash (&dashPattern, &dashLength, &dashStart); +- this->dash_length = dashLength ? dashPattern[0] * scale : 1.0; +- ++ const double *dashPattern=NULL; ++ int dashLength=0; ++ double dashStart=0; ++ const std::vector<double> &dash = state->getLineDash(&dashStart); // > Poppler 22.09 ... ++ dashPattern = dash.data(); ++ dashLength = dash.size(); + if (dashLength == 0) + this->line_style = DIA_LINE_STYLE_SOLID; + else if (dashLength > 5) +@@ -318,10 +317,10 @@ //FIXME: Dia is really unhappy about zero size fonts if (!(state->getFontSize() > 0.0)) return; @@ -14,20 +34,18 @@ ++font_map_hits; return; } -@@ -333,10 +333,9 @@ public : +@@ -333,8 +332,8 @@ gchar *family = g_strdup (f->getFamily() ? f->getFamily()->c_str() : "sans"); - + // we are (not anymore) building the same font over and over again - g_print ("Font 0x%x: '%s' size=%g (* %g)\n", -- GPOINTER_TO_INT (f), family, state->getTransformedFontSize(), scale); -- - // now try to make a fontname Dia/Pango can cope with +- GPOINTER_TO_INT (f), family, state->getTransformedFontSize(), scale); + f1 = &f; + g_print ("Font 0x%x: '%s' size=%g (* %g)\n", GPOINTER_TO_INT (f1), family, state->getTransformedFontSize(), scale); + + // now try to make a fontname Dia/Pango can cope with // strip style postfix - we already have extracted the style bits above - char *pf; - if ((pf = strstr (family, " Regular")) != NULL) -@@ -353,8 +353,9 @@ +@@ -353,8 +352,9 @@ if (fm[0] != 0) fsize *= fabs(fm[3] / fm[0]); font = dia_font_new (family, style, fsize * scale / 0.8); @@ -39,22 +57,25 @@ g_free (family); } void updateTextShift(GfxState *state, double shift) -@@ -721,11 +722,12 @@ +@@ -721,11 +721,15 @@ return; if (!(state->getFontSize() > 0.0)) return; - font = (DiaFont *)g_hash_table_lookup (this->font_map, state->getFont()); -+ font = (DiaFont *)g_hash_table_lookup (this->font_map, &(state->getFont())); ++gconstpointer f_1 = &state->getFont(); ++// g_print ("f_1 %p\n", f_1); ++font = (DiaFont *)g_hash_table_lookup (this->font_map, f_1); ++// font = (DiaFont *)g_hash_table_lookup (this->font_map, &(state->getFont())); // we have to decode the string data first { - GfxFont *f = state->getFont(); +// GfxFont *f = state->getFont(); -+ const std::shared_ptr<GfxFont> f = state->getFont(); ++ const std::shared_ptr<GfxFont> f = state->getFont(); const char *p = s->c_str(); CharCode code; int j = 0, m, n; -@@ -870,8 +872,10 @@ +@@ -870,8 +874,10 @@ std::unique_ptr<PDFDoc> doc; GooString *fileName = new GooString(filename); // no passwords yet @@ -67,7 +88,7 @@ gboolean ret = FALSE; // without this we will get strange crashes (at least with /O2 build) -@@ -899,7 +903,8 @@ +@@ -899,7 +905,8 @@ delete diaOut; ret = TRUE; } |