src/java.desktop/share/classes/sun/font/Font2D.java

Print this page

        

*** 155,164 **** --- 155,179 ---- return; } } } + public static final int FWIDTH_NORMAL = 5; // OS/2 usWidthClass + public static final int FWEIGHT_NORMAL = 400; // OS/2 usWeightClass + public static final int FWEIGHT_BOLD = 700; // OS/2 usWeightClass + + public int getWidth() { + return FWIDTH_NORMAL; + } + + public int getWeight() { + if ((style & Font.BOLD) !=0) { + return FWEIGHT_BOLD; + } else { + return FWEIGHT_NORMAL; + } + } int getRank() { return fontRank; }