[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts
From: |
Hin-Tak Leung |
Subject: |
Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts) |
Date: |
Wed, 24 May 2023 23:27:48 +0000 (UTC) |
I think I have gotten to the bottom of the segfault problem. Pretty sure it is the librsvg people being clever/helpful somewhere between Werner's version and current.
rsvg_handle_get_intrinsic_dimensions() for this header (literal from a a previous message in this thread):
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">...
</svg>
is supposed to fail to return any width and height, which is probably what Werner's older librsvg does. And the ft demo code would set the svg dimension to units_per_EM when it fails.
dimension_svg.width = units_per_EM;
dimension_svg.height = units_per_EM;
but in my newer/current librsvg it returns with a success of 1x1 (I think that's just a "convenient assumption" to go for unit square for intended size when there is no info ), so it is out by a factor of 1000x1000 .
I'll see if I can find the actual change, but I believe the below is the correct fix:
===
@@ -243,6 +243,10 @@
{
dimension_svg.width = (int)out_width.length; /* XXX rounding? */
dimension_svg.height = (int)out_height.length;
+ if (((int)out_width.length == 1) && ((int)out_height.length == 1)) {
+ dimension_svg.width = units_per_EM;
+ dimension_svg.height = units_per_EM;
+ }
}
else
{
===
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), (continued)
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Hin-Tak Leung, 2023/05/23
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Hin-Tak Leung, 2023/05/23
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Ben Wagner, 2023/05/23
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Hin-Tak Leung, 2023/05/23
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Werner LEMBERG, 2023/05/24
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Hin-Tak Leung, 2023/05/24
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Cosimo Lupo, 2023/05/24
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Hin-Tak Leung, 2023/05/24
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Cosimo Lupo, 2023/05/24
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Werner LEMBERG, 2023/05/24
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts),
Hin-Tak Leung <=
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Hin-Tak Leung, 2023/05/24
- Two patches (Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts)), Hin-Tak Leung, 2023/05/25
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Hin-Tak Leung, 2023/05/24
- Re: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts), Hin-Tak Leung, 2023/05/24
- Ftgrid color toggle patch (Fw: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts))), Hin-Tak Leung, 2023/05/25
- Re: Ftgrid color toggle patch (Fw: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts))), Werner LEMBERG, 2023/05/30
- Re: Ftgrid color toggle patch (Fw: ftview segfault on ArefRuqaaInk-Regular.ttf (one of google web fonts))), Hin-Tak Leung, 2023/05/30