Java 类sun.font.FcFontConfiguration 实例源码

项目:openjdk-jdk10    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if ((FontUtilities.isLinux && !mFontConfig.foundOsSpecificFile()) ||
        (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent())) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:OpenJSharp    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:jdk8u-jdk    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:jdk8u-jdk    文件:FcFontManager.java   
@Override
protected FontConfiguration createFontConfiguration() {
    FcFontConfiguration fcFontConfig = new FcFontConfiguration(this);
    if (fcFontConfig.init()) {
        return fcFontConfig;
    } else {
        throw new InternalError("failed to initialize fontconfig");
    }
}
项目:jdk8u-jdk    文件:FcFontManager.java   
@Override
public FontConfiguration createFontConfiguration(boolean preferLocaleFonts,
                                                 boolean preferPropFonts) {
    FcFontConfiguration fcFontConfig =
        new FcFontConfiguration(this, preferLocaleFonts, preferPropFonts);
    if (fcFontConfig.init()) {
        return fcFontConfig;
    } else {
        throw new InternalError("failed to initialize fontconfig");
    }
}
项目:openjdk-jdk10    文件:FcFontManager.java   
@Override
protected FontConfiguration createFontConfiguration() {
    FcFontConfiguration fcFontConfig = new FcFontConfiguration(this);
    if (fcFontConfig.init()) {
        return fcFontConfig;
    } else {
        throw new InternalError("failed to initialize fontconfig");
    }
}
项目:openjdk-jdk10    文件:FcFontManager.java   
@Override
public FontConfiguration createFontConfiguration(boolean preferLocaleFonts,
                                                 boolean preferPropFonts) {
    FcFontConfiguration fcFontConfig =
        new FcFontConfiguration(this, preferLocaleFonts, preferPropFonts);
    if (fcFontConfig.init()) {
        return fcFontConfig;
    } else {
        throw new InternalError("failed to initialize fontconfig");
    }
}
项目:openjdk9    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:openjdk9    文件:FcFontManager.java   
@Override
protected FontConfiguration createFontConfiguration() {
    FcFontConfiguration fcFontConfig = new FcFontConfiguration(this);
    if (fcFontConfig.init()) {
        return fcFontConfig;
    } else {
        throw new InternalError("failed to initialize fontconfig");
    }
}
项目:openjdk9    文件:FcFontManager.java   
@Override
public FontConfiguration createFontConfiguration(boolean preferLocaleFonts,
                                                 boolean preferPropFonts) {
    FcFontConfiguration fcFontConfig =
        new FcFontConfiguration(this, preferLocaleFonts, preferPropFonts);
    if (fcFontConfig.init()) {
        return fcFontConfig;
    } else {
        throw new InternalError("failed to initialize fontconfig");
    }
}
项目:jdk8u_jdk    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:jdk8u_jdk    文件:FcFontManager.java   
@Override
protected FontConfiguration createFontConfiguration() {
    FcFontConfiguration fcFontConfig = new FcFontConfiguration(this);
    if (fcFontConfig.init()) {
        return fcFontConfig;
    } else {
        throw new InternalError("failed to initialize fontconfig");
    }
}
项目:jdk8u_jdk    文件:FcFontManager.java   
@Override
public FontConfiguration createFontConfiguration(boolean preferLocaleFonts,
                                                 boolean preferPropFonts) {
    FcFontConfiguration fcFontConfig =
        new FcFontConfiguration(this, preferLocaleFonts, preferPropFonts);
    if (fcFontConfig.init()) {
        return fcFontConfig;
    } else {
        throw new InternalError("failed to initialize fontconfig");
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:lookaside_java-1.8.0-openjdk    文件:FcFontManager.java   
@Override
protected FontConfiguration createFontConfiguration() {
    FcFontConfiguration fcFontConfig = new FcFontConfiguration(this);
    if (fcFontConfig.init()) {
        return fcFontConfig;
    } else {
        throw new InternalError("failed to initialize fontconfig");
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:FcFontManager.java   
@Override
public FontConfiguration createFontConfiguration(boolean preferLocaleFonts,
                                                 boolean preferPropFonts) {
    FcFontConfiguration fcFontConfig =
        new FcFontConfiguration(this, preferLocaleFonts, preferPropFonts);
    if (fcFontConfig.init()) {
        return fcFontConfig;
    } else {
        throw new InternalError("failed to initialize fontconfig");
    }
}
项目:infobip-open-jdk-8    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:jdk8u-dev-jdk    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:jdk7-jdk    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:openjdk-source-code-learn    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:OLD-OpenJDK8    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:openjdk-jdk7u-jdk    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}
项目:openjdk-icedtea7    文件:X11FontManager.java   
protected FontConfiguration createFontConfiguration() {
    /* The logic here decides whether to use a preconfigured
     * fontconfig.properties file, or synthesise one using platform APIs.
     * On Solaris (as opposed to OpenSolaris) we try to use the
     * pre-configured ones, but if the files it specifies are missing
     * we fail-safe to synthesising one. This might happen if Solaris
     * changes its fonts.
     * For OpenSolaris I don't expect us to ever create fontconfig files,
     * so it will always synthesise. Note that if we misidentify
     * OpenSolaris as Solaris, then the test for the presence of
     * Solaris-only font files will correct this.
     * For Linux we require an exact match of distro and version to
     * use the preconfigured file, and also that it points to
     * existent fonts.
     * If synthesising fails, we fall back to any preconfigured file
     * and do the best we can. For the commercial JDK this will be
     * fine as it includes the Lucida fonts. OpenJDK should not hit
     * this as the synthesis should always work on its platforms.
     */
    FontConfiguration mFontConfig = new MFontConfiguration(this);
    if (FontUtilities.isOpenSolaris ||
        (FontUtilities.isLinux &&
         (!mFontConfig.foundOsSpecificFile() ||
          !mFontConfig.fontFilesArePresent()) ||
         (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
        FcFontConfiguration fcFontConfig =
            new FcFontConfiguration(this);
        if (fcFontConfig.init()) {
            return fcFontConfig;
        }
    }
    mFontConfig.init();
    return mFontConfig;
}