Ejemplo n.º 1
0
        ////////////////////////////////////////////////////////////////////
        // constructor
        ////////////////////////////////////////////////////////////////////

        internal CharInfo
        (
            Int32 CharCode,
            Int32 GlyphIndex,
            FontApi DC
        )
        {
            // save char code and glyph index
            this.CharCode      = CharCode;
            this.GlyphIndex    = GlyphIndex;
            this.NewGlyphIndex = -1;
            Type0Font          = CharCode >= 256 || GlyphIndex == 0;

            // Bounding Box
            Int32 BBoxWidth  = DC.ReadInt32();
            Int32 BBoxHeight = DC.ReadInt32();

            DesignBBoxLeft   = DC.ReadInt32();
            DesignBBoxTop    = DC.ReadInt32();
            DesignBBoxRight  = DesignBBoxLeft + BBoxWidth;
            DesignBBoxBottom = DesignBBoxTop - BBoxHeight;

            // glyph advance horizontal and vertical
            DesignWidth = DC.ReadInt16();
            //DesignHeight = DC.ReadInt16();
            return;
        }
Ejemplo n.º 2
0
        internal BoundingBox
        (
            FontApi DC
        )
        {
            // empty box
            Rect = new PdfRectangle();

            // save width in right
            Rect.Right = DC.WindowsToPdf(DC.ReadInt32());

            // save height
            Double Height = DC.WindowsToPdf(DC.ReadInt32());

            // left
            Rect.Left = DC.WindowsToPdf(DC.ReadInt32());

            // top
            Rect.Top = DC.WindowsToPdf(DC.ReadInt32());

            // adjust right = left + width
            Rect.Right += Rect.Left;

            // adjust bottom = top - height
            Rect.Bottom = Rect.Top - Height;

            // get advanced width
            Width = DC.WindowsToPdf(DC.ReadInt16());
            return;
        }
Ejemplo n.º 3
0
 internal FontBox
 (
     FontApi DC
 )
 {
     Left   = DC.ReadInt32();
     Top    = DC.ReadInt32();
     Right  = DC.ReadInt32();
     Bottom = DC.ReadInt32();
 }
Ejemplo n.º 4
0
 public FontBox
 (
     FontApi DC
 )
 {
     Left   = DC.ReadInt32();
     Top    = DC.ReadInt32();
     Right  = DC.ReadInt32();
     Bottom = DC.ReadInt32();
     return;
 }
Ejemplo n.º 5
0
 internal WinKerningPair
 (
     FontApi DC
 )
 {
     First      = DC.ReadChar();
     Second     = DC.ReadChar();
     KernAmount = DC.ReadInt32();
 }
Ejemplo n.º 6
0
 internal WinKerningPair
 (
     FontApi DC
 )
 {
     First      = DC.ReadChar();
     Second     = DC.ReadChar();
     KernAmount = DC.WindowsToPdf(DC.ReadInt32());
     return;
 }
Ejemplo n.º 7
0
 internal WinOutlineTextMetric
 (
     FontApi DC
 )
 {
     otmSize       = DC.ReadUInt32();
     otmTextMetric = new WinTextMetric(DC);
     DC.Align4();
     otmPanoseNumber = new WinPanose(DC);
     DC.Align4();
     otmfsSelection         = DC.ReadUInt32();
     otmfsType              = DC.ReadUInt32();
     otmsCharSlopeRise      = DC.ReadInt32();
     otmsCharSlopeRun       = DC.ReadInt32();
     otmItalicAngle         = DC.ReadInt32();
     otmEMSquare            = DC.ReadUInt32();
     otmAscent              = DC.ReadInt32();
     otmDescent             = DC.ReadInt32();
     otmLineGap             = DC.ReadUInt32();
     otmsCapEmHeight        = DC.ReadUInt32();
     otmsXHeight            = DC.ReadUInt32();
     otmrcFontBox           = new FontBox(DC);
     otmMacAscent           = DC.ReadInt32();
     otmMacDescent          = DC.ReadInt32();
     otmMacLineGap          = DC.ReadUInt32();
     otmusMinimumPPEM       = DC.ReadUInt32();
     otmptSubscriptSize     = DC.ReadWinPoint();
     otmptSubscriptOffset   = DC.ReadWinPoint();
     otmptSuperscriptSize   = DC.ReadWinPoint();
     otmptSuperscriptOffset = DC.ReadWinPoint();
     otmsStrikeoutSize      = DC.ReadUInt32();
     otmsStrikeoutPosition  = DC.ReadInt32();
     otmsUnderscoreSize     = DC.ReadInt32();
     otmsUnderscorePosition = DC.ReadInt32();
     otmpFamilyName         = DC.ReadString();
     otmpFaceName           = DC.ReadString();
     otmpStyleName          = DC.ReadString();
     otmpFullName           = DC.ReadString();
     return;
 }
Ejemplo n.º 8
0
 internal WinTextMetric
 (
     FontApi DC
 )
 {
     tmHeight           = DC.ReadInt32();
     tmAscent           = DC.ReadInt32();
     tmDescent          = DC.ReadInt32();
     tmInternalLeading  = DC.ReadInt32();
     tmExternalLeading  = DC.ReadInt32();
     tmAveCharWidth     = DC.ReadInt32();
     tmMaxCharWidth     = DC.ReadInt32();
     tmWeight           = DC.ReadInt32();
     tmOverhang         = DC.ReadInt32();
     tmDigitizedAspectX = DC.ReadInt32();
     tmDigitizedAspectY = DC.ReadInt32();
     tmFirstChar        = DC.ReadUInt16();
     tmLastChar         = DC.ReadUInt16();
     tmDefaultChar      = DC.ReadUInt16();
     tmBreakChar        = DC.ReadUInt16();
     tmItalic           = DC.ReadByte();
     tmUnderlined       = DC.ReadByte();
     tmStruckOut        = DC.ReadByte();
     tmPitchAndFamily   = DC.ReadByte();
     tmCharSet          = DC.ReadByte();
     return;
 }