Java 类sun.font.TrueTypeFont 实例源码

项目:OpenJSharp    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:OpenJSharp    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:jdk8u-jdk    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:jdk8u-jdk    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true, false);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:openjdk-jdk10    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:openjdk-jdk10    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true, false);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:openjdk9    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:openjdk9    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true, false);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:jdk8u_jdk    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:jdk8u_jdk    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true, false);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:lookaside_java-1.8.0-openjdk    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true, false);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:infobip-open-jdk-8    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:infobip-open-jdk-8    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:jdk8u-dev-jdk    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:jdk8u-dev-jdk    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:jdk7-jdk    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:jdk7-jdk    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:openjdk-source-code-learn    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:openjdk-source-code-learn    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:OLD-OpenJDK8    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:OLD-OpenJDK8    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:openjdk-jdk7u-jdk    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:openjdk-jdk7u-jdk    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:openjdk-icedtea7    文件:WPathGraphics.java   
@Override
protected int platformFontCount(Font font, String str) {

    AffineTransform deviceTransform = getTransform();
    AffineTransform fontTransform = new AffineTransform(deviceTransform);
    fontTransform.concatenate(getFont().getTransform());
    int transformType = fontTransform.getType();

    /* Test if GDI can handle the transform */
    boolean directToGDI = ((transformType !=
                           AffineTransform.TYPE_GENERAL_TRANSFORM)
                           && ((transformType & AffineTransform.TYPE_FLIP)
                               == 0));

    if (!directToGDI) {
        return 0;
    }

    /* Since all windows fonts are available, and the JRE fonts
     * are also registered. Only the Font.createFont() case is presently
     * unknown to GDI. Those can be registered too, although that
     * code does not exist yet, it can be added too, so we should not
     * fail that case. Just do a quick check whether its a TrueTypeFont
     * - ie not a Type1 font etc, and let drawString() resolve the rest.
     */
    Font2D font2D = FontUtilities.getFont2D(font);
    if (font2D instanceof CompositeFont ||
        font2D instanceof TrueTypeFont) {
        return 1;
    } else {
        return 0;
    }
}
项目:openjdk-icedtea7    文件:Win32FontManager.java   
public Object run() {
    String eudcFile = getEUDCFontFile();
    if (eudcFile != null) {
        try {
            /* Must use Java rasteriser since GDI doesn't
             * enumerate (allow direct use) of EUDC fonts.
             */
            eudcFont = new TrueTypeFont(eudcFile, null, 0,
                                        true);
        } catch (FontFormatException e) {
        }
    }
    return null;
}
项目:OpenJSharp    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:jdk8u-jdk    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:openjdk-jdk10    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:openjdk9    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:jdk8u_jdk    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:lookaside_java-1.8.0-openjdk    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:infobip-open-jdk-8    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:jdk8u-dev-jdk    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:jdk7-jdk    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:openjdk-source-code-learn    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:OLD-OpenJDK8    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:openjdk-jdk7u-jdk    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}
项目:openjdk-icedtea7    文件:Win32FontManager.java   
public TrueTypeFont getEUDCFont() {
    return eudcFont;
}