Esempio n. 1
0
        public TrueTypeFont(Demon.Font.TrueTypeFont underlying)
        {
            _underlying = underlying;

            _toUnicode  = new ToUnicode();
            _fontStream = new FontStream(_underlying.FontFile.ReadAllBytes());
            _widths     = new FontWidths(_underlying.Widths);

            _descriptor = new FontDescriptor(
                _underlying.PostScriptName, _underlying.Flags, _fontStream,
                _underlying.ItalicAngle, _underlying.Ascender, _underlying.Descender,
                _underlying.CapHeight, _underlying.XAvgCharWidth, _underlying.AdvanceWidthMax,
                _underlying.WeightClass, _underlying.XHeight, 0,
                _underlying.BoundingBox);

            _root = new Type0Font(this);
        }
Esempio n. 2
0
 public FontDescriptor(string fontName, ushort flags,
                       FontStream fontFile,
                       float italicAngle, short ascent, short descent,
                       short capHeight, short avgWidth, ushort maxWidth,
                       ushort fontWeight, short xHeight, ushort stemV,
                       BoundingBox bbox)
 {
     _fontName    = fontName;
     _flags       = flags;
     _fontFile    = fontFile;
     _italicAngle = italicAngle;
     _ascent      = ascent;
     _descent     = descent;
     _capHeight   = capHeight;
     _avgWidth    = avgWidth;
     _maxWidth    = maxWidth;
     _fontWeight  = fontWeight;
     _xHeight     = xHeight;
     _stemV       = stemV;
     _bbox        = new Rectangle(bbox);
 }