Simplify PdfFont.ParseSizes.
This commit is contained in:
@@ -87,22 +87,8 @@ namespace VAR.PdfTools
|
|||||||
char actualChar = firstChar;
|
char actualChar = firstChar;
|
||||||
foreach (IPdfElement elem in widths.Values)
|
foreach (IPdfElement elem in widths.Values)
|
||||||
{
|
{
|
||||||
var widthReal = elem as PdfReal;
|
_widths.Add(actualChar, PdfElementUtils.GetReal(elem, 500) / glyphSpaceToTextSpace);
|
||||||
if (widthReal != null)
|
actualChar++;
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// FIMXE: Calculate real height
|
// FIMXE: Calculate real height
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user