Java 类sun.awt.FontDescriptor 实例源码

项目:OpenJSharp    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:OpenJSharp    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:OpenJSharp    文件:FcFontConfiguration.java   
@Override
protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
    CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
    int idx = fontIndex * NUM_STYLES + styleIndex;
    String[] componentFaceNames = cfi[idx].getComponentFaceNames();
    FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
    for (int i = 0; i < componentFaceNames.length; i++) {
        ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.UTF_8.newEncoder(), new int[0]);
    }

    return ret;
}
项目:jdk8u-jdk    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:jdk8u-jdk    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:jdk8u-jdk    文件:FcFontConfiguration.java   
@Override
protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
    CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
    int idx = fontIndex * NUM_STYLES + styleIndex;
    String[] componentFaceNames = cfi[idx].getComponentFaceNames();
    FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
    for (int i = 0; i < componentFaceNames.length; i++) {
        ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.ISO_8859_1.newEncoder(), new int[0]);
    }

    return ret;
}
项目:openjdk-jdk10    文件:FcFontConfiguration.java   
@Override
protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
    CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
    int idx = fontIndex * NUM_STYLES + styleIndex;
    String[] componentFaceNames = cfi[idx].getComponentFaceNames();
    FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
    for (int i = 0; i < componentFaceNames.length; i++) {
        ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.ISO_8859_1.newEncoder(), new int[0]);
    }

    return ret;
}
项目:openjdk-jdk10    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:openjdk-jdk10    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:openjdk9    文件:FcFontConfiguration.java   
@Override
protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
    CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
    int idx = fontIndex * NUM_STYLES + styleIndex;
    String[] componentFaceNames = cfi[idx].getComponentFaceNames();
    FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
    for (int i = 0; i < componentFaceNames.length; i++) {
        ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.ISO_8859_1.newEncoder(), new int[0]);
    }

    return ret;
}
项目:openjdk9    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:openjdk9    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:jdk8u_jdk    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:jdk8u_jdk    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:jdk8u_jdk    文件:FcFontConfiguration.java   
@Override
protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
    CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
    int idx = fontIndex * NUM_STYLES + styleIndex;
    String[] componentFaceNames = cfi[idx].getComponentFaceNames();
    FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
    for (int i = 0; i < componentFaceNames.length; i++) {
        ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.ISO_8859_1.newEncoder(), new int[0]);
    }

    return ret;
}
项目:lookaside_java-1.8.0-openjdk    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:lookaside_java-1.8.0-openjdk    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:lookaside_java-1.8.0-openjdk    文件:FcFontConfiguration.java   
@Override
protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
    CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
    int idx = fontIndex * NUM_STYLES + styleIndex;
    String[] componentFaceNames = cfi[idx].getComponentFaceNames();
    FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
    for (int i = 0; i < componentFaceNames.length; i++) {
        ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.ISO_8859_1.newEncoder(), new int[0]);
    }

    return ret;
}
项目:infobip-open-jdk-8    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:infobip-open-jdk-8    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:infobip-open-jdk-8    文件:FcFontConfiguration.java   
@Override
protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
    CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
    int idx = fontIndex * NUM_STYLES + styleIndex;
    String[] componentFaceNames = cfi[idx].getComponentFaceNames();
    FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
    for (int i = 0; i < componentFaceNames.length; i++) {
        ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.UTF_8.newEncoder(), new int[0]);
    }

    return ret;
}
项目:jdk8u-dev-jdk    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:jdk8u-dev-jdk    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:jdk8u-dev-jdk    文件:FcFontConfiguration.java   
@Override
protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
    CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
    int idx = fontIndex * NUM_STYLES + styleIndex;
    String[] componentFaceNames = cfi[idx].getComponentFaceNames();
    FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
    for (int i = 0; i < componentFaceNames.length; i++) {
        ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.ISO_8859_1.newEncoder(), new int[0]);
    }

    return ret;
}
项目:jdk7-jdk    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:jdk7-jdk    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:openjdk-source-code-learn    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:openjdk-source-code-learn    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:OLD-OpenJDK8    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:OLD-OpenJDK8    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:openjdk-jdk7u-jdk    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:openjdk-jdk7u-jdk    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:openjdk-jdk7u-jdk    文件:FcFontConfiguration.java   
@Override
protected FontDescriptor[] buildFontDescriptors(int fontIndex, int styleIndex) {
    CompositeFontDescriptor[] cfi = get2DCompositeFontInfo();
    int idx = fontIndex * NUM_STYLES + styleIndex;
    String[] componentFaceNames = cfi[idx].getComponentFaceNames();
    FontDescriptor[] ret = new FontDescriptor[componentFaceNames.length];
    for (int i = 0; i < componentFaceNames.length; i++) {
        ret[i] = new FontDescriptor(componentFaceNames[i], StandardCharsets.UTF_8.newEncoder(), new int[0]);
    }

    return ret;
}
项目:openjdk-icedtea7    文件:WFontConfiguration.java   
/**
 * Returns the component font name (face name plus charset) of the
 * font that should be used for AWT text components. May return null.
 */
public String getTextComponentFontName(String familyName, int style) {
    FontDescriptor[] fontDescriptors = getFontDescriptors(familyName, style);
    String fontName = findFontWithCharset(fontDescriptors, textInputCharset);
    if (fontName == null) {
        fontName = findFontWithCharset(fontDescriptors, "DEFAULT_CHARSET");
    }
    return fontName;
}
项目:openjdk-icedtea7    文件:WFontConfiguration.java   
private String findFontWithCharset(FontDescriptor[] fontDescriptors, String charset) {
    String fontName = null;
    for (int i = 0; i < fontDescriptors.length; i++) {
        String componentFontName = fontDescriptors[i].getNativeName();
        if (componentFontName.endsWith(charset)) {
            fontName = componentFontName;
        }
    }
    return fontName;
}
项目:jdk7-jdk    文件:FcFontConfiguration.java   
@Override
public FontDescriptor[] getFontDescriptors(String fontName, int style) {
    return new FontDescriptor[0];
}
项目:openjdk-source-code-learn    文件:FcFontConfiguration.java   
@Override
public FontDescriptor[] getFontDescriptors(String fontName, int style) {
    return new FontDescriptor[0];
}
项目:OLD-OpenJDK8    文件:FcFontConfiguration.java   
@Override
public FontDescriptor[] getFontDescriptors(String fontName, int style) {
    return new FontDescriptor[0];
}
项目:openjdk-icedtea7    文件:FcFontConfiguration.java   
@Override
public FontDescriptor[] getFontDescriptors(String fontName, int style) {
    return new FontDescriptor[0];
}