mirror of
https://github.com/UglyToad/PdfPig.git
synced 2026-01-18 19:51:24 +08:00
fix bug with floating point type 2 charstring calculation #425
This commit is contained in:
@@ -795,8 +795,8 @@ namespace UglyToad.PdfPig.Fonts.CompactFontFormat.CharStrings
|
||||
* and the fourth byte contains the lowest order bits.
|
||||
* This number is interpreted as a Fixed; that is, a signed number with 16 bits of fraction
|
||||
*/
|
||||
var lead = bytes[++i] << 8 | bytes[++i];
|
||||
var fractionalPart = bytes[++i] << 8 | bytes[++i];
|
||||
var lead = (short)(bytes[++i] << 8) + bytes[++i];
|
||||
var fractionalPart = (bytes[++i] << 8) + bytes[++i];
|
||||
|
||||
return lead + (fractionalPart / 65535.0f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user