freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] Checking for proper size in `cff_slot_load'


From: Moazin Khatri
Subject: [ft-devel] Checking for proper size in `cff_slot_load'
Date: Fri, 9 Aug 2019 15:56:45 +0500

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. If there is a more standard way to do this, please let me know. :)

Moazin

reply via email to

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