Examples of BDFFontContainer


Examples of org.jnode.font.bdf.BDFFontContainer

     */
    @Override
    public BDFFont createFont(InputStream stream) throws FontFormatException, IOException {
        try {
            Reader reader = new InputStreamReader(stream);
            BDFFontContainer container = BDFFontContainer.createFont(reader);
            addUserFontData(container);
            return new BDFFont(container);
        } catch (IOException e) {
            throw e;
        } catch (Exception e) {
View Full Code Here

Examples of org.jnode.font.bdf.BDFFontContainer

     */
    @Override
    public Rectangle2D getStringBounds(Font font, CharacterIterator ci,
                                       int begin, int limit, FontRenderContext frc) {
        BDFFont bdfFont = getCompatibleFont(font);
        BDFFontContainer container = bdfFont.getContainer();

        double width = 0;
        double height = 0;
        for (char c = ci.setIndex(begin); ci.getIndex() <= limit; c = ci.next()) {
            if (c == CharacterIterator.DONE)
                break;
           
            BDFGlyph g = container.getGlyph(c);
            if (g != null) {
                width += g.getDWidth().width;
                height = Math.max(g.getDWidth().height, height);
            }               
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.