예제 #1
0
    def __WriteContent(self, dstBuffer: List[int], bitmapFont: BitmapFont) -> None:
        FormatPluginFontBasicKerningUtil.AddString(dstBuffer, bitmapFont.Name)
        FormatPluginFontBasicKerningUtil.AddEncodedUInt16(dstBuffer, bitmapFont.Size)
        FormatPluginFontBasicKerningUtil.AddEncodedUInt16(dstBuffer, bitmapFont.LineSpacingPx)
        FormatPluginFontBasicKerningUtil.AddEncodedUInt16(dstBuffer, bitmapFont.BaseLinePx)
        FormatPluginFontBasicKerningUtil.AddString(dstBuffer, bitmapFont.TextureName)
        FormatPluginFontBasicKerningUtil.AddEncodedBitmapFontType(dstBuffer, bitmapFont.FontType)

        self.__AddChars(dstBuffer, bitmapFont.Chars)
        self.__AddKernings(dstBuffer, bitmapFont.Kernings)
예제 #2
0
 def __AddChar(self, dstBuffer: List[int], bitmapFontChar: BitmapFontChar) -> None:
     FormatPluginFontBasicKerningUtil.AddEncodedUInt32(dstBuffer, bitmapFontChar.Id)
     FormatPluginFontBasicKerningUtil.AddEncodedUInt32(dstBuffer, bitmapFontChar.X)
     FormatPluginFontBasicKerningUtil.AddEncodedUInt32(dstBuffer, bitmapFontChar.Y)
     FormatPluginFontBasicKerningUtil.AddEncodedUInt32(dstBuffer, bitmapFontChar.WidthPx)
     FormatPluginFontBasicKerningUtil.AddEncodedUInt32(dstBuffer, bitmapFontChar.HeightPx)
     FormatPluginFontBasicKerningUtil.AddEncodedInt32(dstBuffer, bitmapFontChar.XOffsetPx)
     FormatPluginFontBasicKerningUtil.AddEncodedInt32(dstBuffer, bitmapFontChar.YOffsetPx)
     FormatPluginFontBasicKerningUtil.AddEncodedUInt16(dstBuffer, bitmapFontChar.XAdvancePx)