## modules/graphics/src/main/java/javafx/scene/CssStyleHelper.java

Print this page

    rev 4839 : RT-2529: Locale specific runtime errors (Turkish)

    *** 27,36 ****
    --- 27,37 ----
      import java.util.ArrayList;
      import java.util.Collections;
      import java.util.HashMap;
      import java.util.HashSet;
      import java.util.List;
    + import java.util.Locale;
      import java.util.Map;
      import java.util.Map.Entry;
      import java.util.Set;

      import com.sun.javafx.scene.CssFlags;
    *** 1505,1515 ****
          }

          /*package access for testing*/ FontPosture getFontPosture(Font font) {
              if (font == null) return FontPosture.REGULAR;

    !         String fontName = font.getName().toLowerCase();

              if (fontName.contains("italic")) {
                  return FontPosture.ITALIC;
              }

    --- 1506,1516 ----
          }

          /*package access for testing*/ FontPosture getFontPosture(Font font) {
              if (font == null) return FontPosture.REGULAR;

    !         String fontName = font.getName().toLowerCase(Locale.ROOT);

              if (fontName.contains("italic")) {
                  return FontPosture.ITALIC;
              }

    *** 1517,1527 ****
          }

          /*package access for testing*/ FontWeight getFontWeight(Font font) {
              if (font == null) return FontWeight.NORMAL;

    !         String fontName = font.getName().toLowerCase();

              if (fontName.contains("bold")) {
                  if (fontName.contains("extra")) return FontWeight.EXTRA_BOLD;
                  if (fontName.contains("ultra")) return FontWeight.EXTRA_BOLD;
                  else if (fontName.contains("semi")) return FontWeight.SEMI_BOLD;
    --- 1518,1528 ----
          }

          /*package access for testing*/ FontWeight getFontWeight(Font font) {
              if (font == null) return FontWeight.NORMAL;

    !         String fontName = font.getName().toLowerCase(Locale.ROOT);

              if (fontName.contains("bold")) {
                  if (fontName.contains("extra")) return FontWeight.EXTRA_BOLD;
                  if (fontName.contains("ultra")) return FontWeight.EXTRA_BOLD;
                  else if (fontName.contains("semi")) return FontWeight.SEMI_BOLD;