Package com.ardor3d.ui.text

Examples of com.ardor3d.ui.text.BMFont


                        closest.bmFont = (BMFont) binaryImporter.load(url);
                    } else {
                        // Not found, load from .fnt
                        resource = closest.source + ".fnt";
                        url = ResourceLocatorTool.getClassPathResource(BMFontProvider.class, resource);
                        closest.bmFont = new BMFont(new URLResourceSource(url), false);
                    }
                } catch (final IOException e) {
                    BMFontProvider.logger.severe("Unable to load font: " + closest.source);
                    return null;
                }
View Full Code Here


        final SpatialController<BMText> fontChanger = createFontChanger();
        final SpatialController<Node> nodeMover = createNodeMover();
        textMoveNode.addController(nodeMover);

        final BMFont font = BMFontLoader.defaultFont();
        final String initialString = font.getStyleName() + "\nThe Quick Brown Fox...";
        final double fontScale = 1.0;
        if (true) {
            final BMText text = new BMText("textSpatial1", initialString, font, BMText.Align.SouthWest,
                    BMText.Justify.Right);
            text.setFontScale(fontScale);
View Full Code Here

        for (final FontLoad fl : fontNames) {
            try {
                final String file = "fonts/" + fl.fontName + ".fnt";
                final ResourceSource url = ResourceLocatorTool.locateResource(ResourceLocatorTool.TYPE_TEXTURE, file);
                final BMFont bmFont = new BMFont(url, fl.useMipMaps);
                _fontList.add(bmFont);
            } catch (final Throwable t) {
                logger.warning(t.getMessage());
            }
        }
View Full Code Here

TOP

Related Classes of com.ardor3d.ui.text.BMFont

Copyright © 2018 www.massapicom. 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.