GlyphAdvanceFactor vs GlyphAdvanceOffset

Posted by: brian on 6 November 2023, 5:13 am EST

    • Post Options:
    • Link

    Posted 6 November 2023, 5:13 am EST

    What is the difference between the GlyphAdvanceFactor and GlyphAdvanceOffset?

    Do they perform the same function, expect GlyphAdvanceOffset is an exact metric and GlyphAdvanceFactor is a scale?

    The GlyphAdvanceOffset says “advance value in graphic units”, but is a float. What is the graphic unit, is that points, pixels, etc…

    Thanks.

  • Posted 6 November 2023, 5:10 pm EST

    Hi Brian,

    Thanks for reaching out to us with your query.

    You are correct, they both used to adjust glyph advance value for the characters.

    Where, GlyphAdvanceFactor can be set for the relative font’s average character width. The minimum value is 0.5 and Default value is 1.

    Whereas, GlyphAdvanceoffset can be set for absolute glyph advance value in graphic unit. It’s default value is 0(float) and can be increamented to adjust glyph advance value.

    We are discussing this with the development team about the “Graphic Unit”. Will let you know once they respond.[Internla Tracking Id - DOC-5839]

    Best Regards,

    Nitin

  • Posted 16 November 2023, 5:57 pm EST

    Hi,

    As per the development team, If the target graphics is a GcPdfGraphics, then the units are printer points (1/72in) unless you have changed the graphics resolution from the default (72dpi).

    Otherwise, the graphic unit is a device independent pixel (DIP), equal to 1/96in.

    DIP’s relation to physical pixels is determined by the original image’s resolution, also accessible via (GcGraphics.SurfaceResolution). If the original resolution is 96dpi or not defined, then one DIP is equal to one physical pixel.

    Regards,

    Nitin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels