freetype-devel
[Top][All Lists]
Advanced

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

Another patch for ft2-demo (Re: ft2-demo ot-svg support ported to python


From: Hin-Tak Leung
Subject: Another patch for ft2-demo (Re: ft2-demo ot-svg support ported to python freetype-py/pycairo)
Date: Fri, 30 Jun 2023 02:11:08 +0000 (UTC)

Hi Werner,

Here is the patch. I think you might want to do some stylistic changes, but 
let's start with something concrete. Strictly speaking the logic is a little 
different from how it was, for the case of malformed svg documents where 
"start_glyph_id >  end_glyph_id" (normal is "=" and "<"). I think the new 
behavior is better - malformed svg documents get rendered so you see something, 
and hopefully something wildly wrong, thus letting you know that it is 
malformed (in the old, malformed svg glyphs don't render).

Also currently the code does not check that glyph_index is between 
start_glyph_id and end_glyph_id . Should it? This is the part where those 
Google fonts a few weeks ago would have been flagged as faulty. Should a 
"fprintf( stderr, ..." be where "start_glyph_id >  end_glyph_id"  and also if 
glyph_index is outside start_glyph_id and end_glyph_id ?

I don't feel strongly either way, but removing 25 lines, and a large "if ... 
then ..." makes it easier to read.

Hin-Tak

On Friday, 30 June 2023 at 01:43:51 BST, Hin-Tak Leung 
<htl10@users.sourceforge.net> wrote:

...

I think I'll prepare a patch for removing rsvg_handle_render_document(), but I 
don't feel too strongly that way - it is functionally the same, just removing 
about 20 lines and makes the file easier to read (in the future).

...

Attachment: 0001-src-rsvg-port.c-rsvg_port_preset_slot-simplify-usage.patch
Description: Text Data


reply via email to

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