Hi,

In `TT_Load_Glyph', there is some code that checks if the sizes have been
set correctly.

    /* if FT_LOAD_NO_SCALE is not set, `ttmetrics' must be valid */
>     if ( !( load_flags & FT_LOAD_NO_SCALE ) && !size->ttmetrics.valid )
>     {
>       error = FT_THROW( Invalid_Size_Handle );
>       goto Exit;
>     }


No similar portion is found in `cff_slot_load'. In fact, the check occurs
quite later in the following line:

>         error = decoder_funcs->parse_charstrings( &psdecoder,
>                                                   charstring,
>                                                   charstring_len );


For OT-SVG glyphs, I want to check if the size has been set earlier than
this (because my checks for OT-SVG glyphs come early too). Are there easy
ways to do that? Since I only care about `x_ppem' and `y_ppem' I can just
simply check for those two values as I do here
<https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?h=GSoC-2019-moazin&id=6be6e76313831a6fa0b066acf8565acfb6f00109>.
If there is a more standard way to do this, please let me know. :)

Moazin
_______________________________________________
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to