We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In com.openhtmltopdf.svgsupport.PDFTranscoder.OpenHtmlFontResolver two getWeight methods resolve the font-weight:400 to different weight values.
com.openhtmltopdf.svgsupport.PDFTranscoder.OpenHtmlFontResolver
font-weight:400
private Float getWeight(Integer weight) { if (weight == null) { return null; } switch (weight.intValue()) { ... case 400: return TextAttribute.WEIGHT_REGULAR; ... } }
Float getWeight(IdentValue weight) { if (weight == IdentValue.NORMAL) { return TextAttribute.WEIGHT_REGULAR; ... } else if (weight == IdentValue.FONT_WEIGHT_400) { return TextAttribute.WEIGHT_MEDIUM; } ... }
WEIGHT_REGULAR=Float.valueOf(1.0f); WEIGHT_MEDIUM=Float.valueOf(1.5f);
WEIGHT_REGULAR=Float.valueOf(1.0f);
WEIGHT_MEDIUM=Float.valueOf(1.5f);
Similar problem for resolving styles. Normal resolves to null here:
private Float getStyle(IdentValue fontStyle) { if (fontStyle == IdentValue.ITALIC || fontStyle == IdentValue.OBLIQUE) return TextAttribute.POSTURE_OBLIQUE; return null; }
Normal resolves to 0f here (which is the preffered value).
private Float getStyle(FontStyle style) { switch (style) { case ITALIC: case OBLIQUE: return TextAttribute.POSTURE_OBLIQUE; case NORMAL: default: return 0f; } }
This causes the font not being interpreted correctly for drawing SVGs.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In
com.openhtmltopdf.svgsupport.PDFTranscoder.OpenHtmlFontResolver
two getWeight methods resolve the
font-weight:400
to different weight values.WEIGHT_REGULAR=Float.valueOf(1.0f);
WEIGHT_MEDIUM=Float.valueOf(1.5f);
Similar problem for resolving styles.
Normal resolves to null here:
Normal resolves to 0f here (which is the preffered value).
This causes the font not being interpreted correctly for drawing SVGs.
The text was updated successfully, but these errors were encountered: