public bool TryGetGlyphExtents(uint glyph, out GlyphExtents extents) { fixed(GlyphExtents *e = &extents) { return(HarfBuzzApi.hb_font_get_glyph_extents(Handle, glyph, e)); } }
public GlyphExtents GetGlyphExtents(uint glyph) { if (HarfBuzzApi.hb_font_get_glyph_extents(Handle, glyph, out var extents)) { return(extents); } return(new GlyphExtents()); }
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()); }
public bool TryGetGlyphExtents(uint glyph, out GlyphExtents extents) => HarfBuzzApi.hb_font_get_glyph_extents(Handle, glyph, out extents);