+float parsePxOrPercent(char*fontname, char*str)
+{
+ int l = strlen(str);
+ if(strchr(str, '%'))
+ return parsePercent(str);
+ if(l>2 && str[l-2]=='p' && str[l-1]=='t') {
+ float p = atof(str);
+ return p/64.0; /*64 = FT_SUBPIXELS- see ../lib/modules/swffont.c */
+ }
+ syntaxerror("Expression '%s' is neither a point size (?pt) nor a percentage (?%)", str);
+ return 0;
+}
+