Check for index in range before returning CPIS value.
This commit is contained in:
@@ -282,7 +282,10 @@ namespace CvtFont
|
||||
public static float GetCPIs(uint i)
|
||||
{
|
||||
if (FontIsPropt(i)) return 12;
|
||||
return CPIS[i & 63];
|
||||
uint j = i & 63;
|
||||
if (j > CPIS.Length - 1)
|
||||
return CPIS[0];
|
||||
return CPIS[j];
|
||||
}
|
||||
public static float GetPrintPitch(uint i)
|
||||
{
|
||||
|
Reference in New Issue
Block a user