github.com/unidoc/unidoc@v2.2.0+incompatible/pdf/model/fonts/font.go (about) 1 /* 2 * This file is subject to the terms and conditions defined in 3 * file 'LICENSE.md', which is part of this source code package. 4 */ 5 6 package fonts 7 8 import ( 9 "github.com/unidoc/unidoc/pdf/core" 10 "github.com/unidoc/unidoc/pdf/model/textencoding" 11 ) 12 13 type Font interface { 14 SetEncoder(encoder textencoding.TextEncoder) 15 GetGlyphCharMetrics(glyph string) (CharMetrics, bool) 16 ToPdfObject() core.PdfObject 17 } 18 19 type CharMetrics struct { 20 GlyphName string 21 Wx float64 22 Wy float64 23 }