Skip to content

Commit 732d426

Browse files
committed
thin, thick and medium identifiers have fixed values since May 2022
See CSSWG issue 7254.
1 parent a0bb69e commit 732d426

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/io/sf/carte/doc/style/css/awt/AWTStyleDatabase.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,16 +212,15 @@ public float getFontSizeFromIdentifier(String familyName, String fontSizeIdentif
212212

213213
@Override
214214
public float getWidthSize(String widthIdentifier, float fontSize) throws DOMException {
215-
// Normalize to device resolution
216-
float factor = Math.max(0.62f, deviceResolutionFactor());
217215
if ("thin".equalsIgnoreCase(widthIdentifier)) {
218-
return 1f * factor;
216+
return 0.75f; // 1px
219217
} else if ("thick".equalsIgnoreCase(widthIdentifier)) {
220-
return 4f * factor;
218+
return 3.75f; // 5px
221219
} else if ("medium".equalsIgnoreCase(widthIdentifier)) {
222-
return 2f * factor;
220+
return 2.25f; // 3px
223221
} else {
224-
throw new DOMException(DOMException.SYNTAX_ERR, "Unknown identifier " + widthIdentifier);
222+
throw new DOMException(DOMException.SYNTAX_ERR,
223+
"Unknown identifier " + widthIdentifier);
225224
}
226225
}
227226

0 commit comments

Comments
 (0)