mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-20 11:37:57 +08:00
handle 0 length gylph in true type font
This commit is contained in:
@@ -121,6 +121,13 @@
|
|||||||
|
|
||||||
private static Glyph ReadSimpleGlyph(TrueTypeDataBytes data, short contourCount, PdfRectangle bounds)
|
private static Glyph ReadSimpleGlyph(TrueTypeDataBytes data, short contourCount, PdfRectangle bounds)
|
||||||
{
|
{
|
||||||
|
if (contourCount == 0)
|
||||||
|
{
|
||||||
|
return new Glyph(true, EmptyArray<byte>.Instance, EmptyArray<ushort>.Instance,
|
||||||
|
EmptyArray<GlyphPoint>.Instance,
|
||||||
|
new PdfRectangle(0, 0, 0, 0));
|
||||||
|
}
|
||||||
|
|
||||||
var endPointsOfContours = data.ReadUnsignedShortArray(contourCount);
|
var endPointsOfContours = data.ReadUnsignedShortArray(contourCount);
|
||||||
|
|
||||||
var instructionLength = data.ReadUnsignedShort();
|
var instructionLength = data.ReadUnsignedShort();
|
||||||
|
Reference in New Issue
Block a user