freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Ftgrid color toggle patch (Fw: ftview segfault on ArefRuqaaInk-Regular.t


From: Hin-Tak Leung
Subject: Ftgrid color toggle patch (Fw: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts)))
Date: Thu, 25 May 2023 20:01:29 +0000 (UTC)

Just reposting with better Subject. This is the first of 3 patches for ft2-demo - this one adds a color toggle to ftgrid similar to what is already in ftview.

The other two patches are both librsvg related, one addresses deprecation warnings, the other is the final goal of this thread, correcting insanely large bitmaps with newer librsvg.

----- Forwarded message -----
From: Hin-Tak Leung <htl10@users.sourceforge.net>
To: Werner LEMBERG <wl@gnu.org>
Cc: "bungeman@gmail.com" <bungeman@gmail.com>; "apodtele@gmail.com" <apodtele@gmail.com>; "freetype-devel@nongnu.org" <freetype-devel@nongnu.org>
Sent: Thursday, 25 May 2023 at 02:35:39 GMT+8
Subject: Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts)

Noticed small error in the commit message, s/write_header/event_help/.
On Wednesday, 24 May 2023, 19:27:58 BST, Hin-Tak Leung <htl10@users.sourceforge.net> wrote:


On Wednesday, 24 May 2023, 05:49:00 BST, Werner LEMBERG <wl@gnu.org> wrote:


> > I finished adding the color toggle to ftgrid (trivial, just cut and
> > paste a few lines from ftview)

> Please submit a Merge Request!



Could we do it the old-fashioned way ("git format-patch" on one side, "git am" on the other)? Don't know when I'd get my freedesktop gitlab registration back... attached.

Do you want the other one below about large memory allocated for bitmaps? For now this seems to do it (without breaking adobe-made/sourced svg fonts) , but until we see more svg fonts, we aren't sure. I think we probably should put a stop on insanely large bitmaps (e.g. doing 12000x15000 instead of 12x15) anyway, elsewhere.

Hin-Tak

src/rsvg-port.c line 255-ish:

===
    /* Scale factors from SVG coordinates to the needed output size. */
    x_svg_to_out = (double)metrics.x_ppem / dimension_svg.width;
    y_svg_to_out = (double)metrics.y_ppem / dimension_svg.height;

+    if ((out_has_viewbox != TRUE) &&
+        (((int)out_width.length == 1) && ((int)out_height.length == 1))) {
+      x_svg_to_out /= units_per_EM;
+      y_svg_to_out /= units_per_EM;
+    }
+
    /*
      * Create a cairo recording surface.  This is done for two reasons.
      * Firstly, it is required to get the bounding box of the final drawing

===

Attachment: 0001-ftgrid-Copy-toggles-for-color-and-color-layered-glyp.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]