diff --git a/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontVisualPanel1.form b/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontVisualPanel1.form index 21427ff99..597e44cc2 100644 --- a/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontVisualPanel1.form +++ b/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontVisualPanel1.form @@ -19,14 +19,14 @@ - + - + @@ -56,12 +56,40 @@ - + - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontVisualPanel1.java b/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontVisualPanel1.java index 74a634143..7c1be8e99 100644 --- a/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontVisualPanel1.java +++ b/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontVisualPanel1.java @@ -39,6 +39,7 @@ public final class AngelFontVisualPanel1 extends JPanel { jScrollPane1 = new javax.swing.JScrollPane(); jList1 = new javax.swing.JList(); + jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jList1.setModel(new javax.swing.AbstractListModel() { @@ -53,8 +54,23 @@ public final class AngelFontVisualPanel1 extends JPanel { }); jScrollPane1.setViewportView(jList1); + jPanel1.setBackground(new java.awt.Color(0, 0, 0)); + + jLabel1.setBackground(new java.awt.Color(0, 0, 0)); + jLabel1.setForeground(new java.awt.Color(255, 255, 255)); org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(AngelFontVisualPanel1.class, "AngelFontVisualPanel1.jLabel1.text")); // NOI18N + javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); + jPanel1.setLayout(jPanel1Layout); + jPanel1Layout.setHorizontalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE) + ); + jPanel1Layout.setVerticalGroup( + jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) + ); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -62,22 +78,23 @@ public final class AngelFontVisualPanel1 extends JPanel { .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE)) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) - .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) + .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); }// //GEN-END:initComponents private void updateFont(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_updateFont - jLabel1.setIcon(new ImageIcon(FontCreator.buildFont((String) jList1.getSelectedValue()))); + jLabel1.setIcon(new ImageIcon(FontCreator.buildFont((String) jList1.getSelectedValue(), 256))); selectedFont = (String) jList1.getSelectedValue(); }//GEN-LAST:event_updateFont // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabel1; private javax.swing.JList jList1; + private javax.swing.JPanel jPanel1; private javax.swing.JScrollPane jScrollPane1; // End of variables declaration//GEN-END:variables } diff --git a/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontWizardIterator.java b/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontWizardIterator.java index c48ad5961..f3829a2fb 100644 --- a/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontWizardIterator.java +++ b/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/AngelFontWizardIterator.java @@ -95,7 +95,7 @@ public final class AngelFontWizardIterator implements WizardDescriptor.Instantia } outputFile = FileUtil.toFile(pm.getAssetFolder().getFileObject("Interface/Fonts")); if (!outputFile.getName().endsWith(".png")) { - outputFile = new File(outputFile.getAbsoluteFile() + File.separator + name + ".png"); + outputFile = new File(outputFile.getAbsoluteFile() + File.separator + name.replaceAll(" ", "") + ".png"); } // write png file ImageIO.write(fontImage, "PNG", outputFile); diff --git a/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/FontCreator.java b/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/FontCreator.java index d6817643e..e7ae1096b 100644 --- a/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/FontCreator.java +++ b/sdk/jme3-angelfont/src/com/jme3/gde/angelfont/FontCreator.java @@ -25,14 +25,17 @@ public abstract class FontCreator { } public static BufferedImage buildFont(String fontName) { - return buildFont(fontName, 63); + return buildFont(fontName, 512); } - public static BufferedImage buildFont(String fontName, int offset) { + public static BufferedImage buildFont(String fontName, int bitmapSize) { + return buildFont(fontName, bitmapSize, 63); + } + + public static BufferedImage buildFont(String fontName, int bitmapSize, int offset) { BufferedImage fontImage; Font font; - int bitmapSize = 512; // set the size for the bitmap texture boolean sizeFound = false; boolean directionSet = false; int delta = 0; @@ -134,5 +137,4 @@ public abstract class FontCreator { // System.out.println(charLocs); return fontImage; } - }