src/solaris/classes/sun/font/FcFontConfiguration.java

Print this page




 153     @Override
 154     public String getFileNameFromPlatformName(String platformName) {
 155         /* Platform name is the file name, but rather than returning
 156          * the arg, return null*/
 157         return null;
 158     }
 159 
 160     @Override
 161     protected Charset getDefaultFontCharset(String fontName) {
 162         return Charset.forName("ISO8859_1");
 163     }
 164 
 165     @Override
 166     protected String getEncoding(String awtFontName,
 167                                  String characterSubsetName) {
 168         return "default";
 169     }
 170 
 171     @Override
 172     protected void initReorderMap() {
 173         reorderMap = new HashMap();
 174     }
 175 
 176     @Override
 177     protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
 178         CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
 179         int idx = fontIndex * NUM_STYLES + styleIndex;
 180         String[] componentFaceNames = cfi[idx].getComponentFaceNames();
 181         FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
 182         for (int i = 0; i < componentFaceNames.length; i++) {
 183             ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.UTF_8.newEncoder(), new int[0]);
 184         }
 185 
 186         return ret;
 187     }
 188 
 189     @Override
 190     public int getNumberCoreFonts() {
 191         return 1;
 192     }
 193 




 153     @Override
 154     public String getFileNameFromPlatformName(String platformName) {
 155         /* Platform name is the file name, but rather than returning
 156          * the arg, return null*/
 157         return null;
 158     }
 159 
 160     @Override
 161     protected Charset getDefaultFontCharset(String fontName) {
 162         return Charset.forName("ISO8859_1");
 163     }
 164 
 165     @Override
 166     protected String getEncoding(String awtFontName,
 167                                  String characterSubsetName) {
 168         return "default";
 169     }
 170 
 171     @Override
 172     protected void initReorderMap() {
 173         reorderMap = new HashMap<>();
 174     }
 175 
 176     @Override
 177     protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
 178         CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
 179         int idx = fontIndex * NUM_STYLES + styleIndex;
 180         String[] componentFaceNames = cfi[idx].getComponentFaceNames();
 181         FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
 182         for (int i = 0; i < componentFaceNames.length; i++) {
 183             ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.UTF_8.newEncoder(), new int[0]);
 184         }
 185 
 186         return ret;
 187     }
 188 
 189     @Override
 190     public int getNumberCoreFonts() {
 191         return 1;
 192     }
 193