Simplify PdfFont.ParseSizes.

This commit is contained in:
2017-06-26 22:17:46 +02:00
parent 36fb20eb2e
commit b11a2ac393

View File

@@ -87,22 +87,8 @@ namespace VAR.PdfTools
char actualChar = firstChar;
foreach (IPdfElement elem in widths.Values)
{
var widthReal = elem as PdfReal;
if (widthReal != null)
{
double charWidth = widthReal.Value / glyphSpaceToTextSpace;
_widths.Add(actualChar, charWidth);
actualChar++;
continue;
}
var widthInt = elem as PdfInteger;
if (widthInt != null)
{
double charWidth = widthInt.Value / glyphSpaceToTextSpace;
_widths.Add(actualChar, charWidth);
actualChar++;
continue;
}
_widths.Add(actualChar, PdfElementUtils.GetReal(elem, 500) / glyphSpaceToTextSpace);
actualChar++;
}
// FIMXE: Calculate real height
}