Changeset 6663 in josm


Ignore:
Timestamp:
2014-01-10T18:03:03+01:00 (11 years ago)
Author:
simon04
Message:

fix #9551 - MapCSS: fix font-weight: bold

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/ElemStyle.java

    r6284 r6663  
    155155
    156156    protected static Font getFont(Cascade c) {
    157         initDefaultFontParameters(); // populated cached preferences, if necesary
     157        initDefaultFontParameters(); // populated cached preferences, if necessary
    158158        String name = c.get("font-family", DEFAULT_FONT_NAME, String.class);
    159159        float size = c.get("font-size", DEFAULT_FONT_SIZE, Float.class);
    160160        int weight = Font.PLAIN;
    161         Keyword weightKW = c.get("font-weight", null, Keyword.class);
    162         if (weightKW != null && equal(weightKW, "bold")) {
     161        if ("bold".equalsIgnoreCase(c.get("font-weight", null, String.class))) {
    163162            weight = Font.BOLD;
    164163        }
    165164        int style = Font.PLAIN;
    166         Keyword styleKW = c.get("font-style", null, Keyword.class);
    167         if (styleKW != null && equal(styleKW.val, "italic")) {
     165        if ("italic".equalsIgnoreCase(c.get("font-style", null, String.class))) {
    168166            style = Font.ITALIC;
    169167        }
Note: See TracChangeset for help on using the changeset viewer.