Пример #1
0
 public bool TryGetGlyphExtents(uint glyph, out GlyphExtents extents)
 {
     fixed(GlyphExtents *e = &extents)
     {
         return(HarfBuzzApi.hb_font_get_glyph_extents(Handle, glyph, e));
     }
 }
Пример #2
0
        public GlyphExtents GetGlyphExtents(uint glyph)
        {
            if (HarfBuzzApi.hb_font_get_glyph_extents(Handle, glyph, out var extents))
            {
                return(extents);
            }

            return(new GlyphExtents());
        }
Пример #3
0
        public GlyphExtents GetGlyphExtents(int glyph)
        {
            if (glyph < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(glyph), "Glyph must be non negative.");
            }

            if (HarfBuzzApi.hb_font_get_glyph_extents(Handle, (uint)glyph, out var extents))
            {
                return(extents);
            }

            return(new GlyphExtents());
        }
Пример #4
0
 public bool TryGetGlyphExtents(uint glyph, out GlyphExtents extents) =>
 HarfBuzzApi.hb_font_get_glyph_extents(Handle, glyph, out extents);