public Type1Font(Demon.Font.Type1Font underlying) { _underlying = underlying; _descriptor = new FontDescriptor( _underlying.PostScriptName, _underlying.Flags, null, _underlying.ItalicAngle, _underlying.Ascender, _underlying.Descender, _underlying.CapHeight, _underlying.XAvgCharWidth, _underlying.AdvanceWidthMax, _underlying.WeightClass, _underlying.XHeight, 0, _underlying.BoundingBox); // Underlying widths are reloaded during base.Load _widths = new FontWidths(_underlying.Widths); }
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); }