Skip to content

Commit 2d514b2

Browse files
committed
解决另一个字符是方框
1 parent 2e8a99f commit 2d514b2

File tree

1 file changed

+2
-4
lines changed
  • src/MediaConverters/SkiaWmfRenderer/samples/sample

1 file changed

+2
-4
lines changed

src/MediaConverters/SkiaWmfRenderer/samples/sample/Program.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,9 @@
9393

9494
if (tryGetGlyph)
9595
{
96-
var bytes = BitConverter.GetBytes(glyph);
97-
//SKTextEncoding.GlyphId
98-
96+
var bytes = BitConverter.GetBytes((ushort)glyph);
9997

100-
skTextBlob = SKTextBlob.Create(bytes,SKTextEncoding.GlyphId,skFont);
98+
skTextBlob = SKTextBlob.Create(bytes, SKTextEncoding.GlyphId, skFont);
10199
skCanvas.DrawText(skTextBlob, 100, 100, skPaint);
102100
}
103101

0 commit comments

Comments
 (0)