public void DrawOneByteChar(int c1, Font font, string str, int i) { if (c1 < font.firstChar || c1 > font.lastChar) { c1 = font.MapUnicodeChar(c1); } if (c1 == 40 || c1 == 41 || c1 == 92) { this.Append(92); } this.Append((byte)c1); if (font.isStandard && font.kernPairs && i < str.Length - 1) { c1 -= 32; int num = (int)str[i + 1]; if (num < font.firstChar || num > font.lastChar) { num = 32; } for (int j = 2; j < font.metrics[c1].Length; j += 2) { if (font.metrics[c1][j] == num) { this.Append(") "); this.Append(-font.metrics[c1][j + 1]); this.Append(" ("); return; } } } }
public void DrawOneByteChar(int c1, Font font, String str, int i) { if (c1 < font.firstChar || c1 > font.lastChar) { c1 = font.MapUnicodeChar(c1); } if (c1 == '(' || c1 == ')' || c1 == '\\') { Append((byte) '\\'); } Append((byte) c1); if (font.isStandard && font.kernPairs && i < (str.Length -1)) { c1 -= 32; int c2 = str[i + 1]; if (c2 < font.firstChar || c2 > font.lastChar) { c2 = 32; } for (int j = 2; j < font.metrics[c1].Length; j += 2) { if (font.metrics[c1][j] == c2) { Append(") "); Append(-font.metrics[c1][j + 1]); Append(" ("); break; } } } }