Beispiel #1
0
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine("{");
            builder.AppendFormat("\t\"glyphMetrics\": {0},\n", glyphMetrics.ToString().Replace("\n", "\n\t"));
            builder.AppendFormat("\t\"dataLen\": {0}\n", dataLen);
            builder.Append("}");
            return(builder.ToString());
        }
Beispiel #2
0
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine("{");
            builder.AppendFormat("\t\"bigMetrics\": {0},\n", bigMetrics.ToString().Replace("\n", "\n\t"));
            builder.AppendFormat("\t\"numComponents\": {0}\n", numComponents);
            builder.Append("}");
            return(builder.ToString());
        }
Beispiel #3
0
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine("{");
            builder.AppendFormat("\t\"bigMetrics\": {0},\n", bigMetrics.ToString().Replace("\n", "\n\t"));
            builder.AppendFormat("\t\"imageData.Length\": {0}\n", imageData.Length);
            builder.Append("}");
            return(builder.ToString());
        }
Beispiel #4
0
        /*
         * public override GlyphBitmapData[] ReadGlyphBitmapData(BinaryReaderFont reader, int count) {
         *      ushort imageFormat = header.imageFormat;
         *      return GlyphBitmapData.ReadArray(
         *              reader,
         *              imageFormat,
         *              (int)imageSize,
         *              (int)numGlyphs
         *      );
         * }
         */

        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine("{");
            builder.AppendFormat("\t\"header\": {0},\n", header.ToString().Replace("\n", "\n\t"));
            builder.AppendFormat("\t\"imageSize\": {0},\n", imageSize);
            builder.AppendFormat("\t\"bigMetrics\": {0},\n", bigMetrics.ToString().Replace("\n", "\n\t"));
            builder.AppendFormat("\t\"numGlyphs\": {0},\n", numGlyphs);

            /*
             * builder.AppendLine("\t\"glyphIdArray\": [");
             * for (int i = 0; i < numGlyphs; i++) {
             *      builder.AppendFormat("\t\t{0},\n", glyphIdArray[i]);
             * }
             * if (numGlyphs > 0) {
             *      builder.Remove(builder.Length - 2, 1);
             * }
             * builder.AppendLine("\t]");
             */
            builder.Append("}");
            return(builder.ToString());
        }