Parallax font problem
MagIO2
Posts: 2,243
I'm currently writing my own PST-compatible terminal (in terms of positioning) with some special functions. I'm coding in Java since I found the RXTX lib, which allows to use serial interfaces.
As I found the Parallax font in the windows-font-folder I gave it a try. I still like the idea of allowing the propeller to 'paint' in the terminal window in it's own font - like drawing schematics or drawing digital signal timing diagrams ....
So I simply did a
new Font("Parallax", Font.PLAIN, 12)
and used that on a text-panel. It drawed something, but it looked like the text is shifted up and out of the drawing area of the text-panel. I tried with some different settings for the fonts-size, but no luck. Then I continued with another monospace font.
Now, I wanted to check again and maybe do a screenshot for the forum, but it got worse! Now I get an exception - propably because I now use a tabbed-pane and it fails to use that font at all.
Having a look into the windows-font-folder (win7) also shows some problems. If you double-click on the Parallax standard a demo window opens showing the font in different sizes. 24 pixel and I think 32 pixel produced a strange output.
Before spending to much time on my own I just want to make sure that there is no solution yet. Ideas are also welcome! Maybe the font needs to be fixed? Some inconsistency in the font file?
As I found the Parallax font in the windows-font-folder I gave it a try. I still like the idea of allowing the propeller to 'paint' in the terminal window in it's own font - like drawing schematics or drawing digital signal timing diagrams ....
So I simply did a
new Font("Parallax", Font.PLAIN, 12)
and used that on a text-panel. It drawed something, but it looked like the text is shifted up and out of the drawing area of the text-panel. I tried with some different settings for the fonts-size, but no luck. Then I continued with another monospace font.
Now, I wanted to check again and maybe do a screenshot for the forum, but it got worse! Now I get an exception - propably because I now use a tabbed-pane and it fails to use that font at all.
Having a look into the windows-font-folder (win7) also shows some problems. If you double-click on the Parallax standard a demo window opens showing the font in different sizes. 24 pixel and I think 32 pixel produced a strange output.
Before spending to much time on my own I just want to make sure that there is no solution yet. Ideas are also welcome! Maybe the font needs to be fixed? Some inconsistency in the font file?
Comments
And here I have a reproducer for the problem in Java. It should show the text :
"This is an editable JTextArea.\n" +
"A text area is a \"plain\" text component,\n" ....
... and it does in all other fonts I tried.
Someone who can convert it back and forth to check whether the result is maybe better?
There is a online font converter and converting the font from TTF to OTF and back to TTF fixed the problem. Strange that the original TTF needed 1.4MB whereas the resulting TTF only needs 32kB. But it looks good enough for me!
Now I have to extract a conversion table from the propeller tool character window and I'm ready to receive special characters from my propellers - like nice timing diagrams of digital signals ...
..
well the search was not as easy as it sounds. Downoaded a test version of a font editor which also had problems with the font. The automatic corrections this tool offered did not help. Then I figured out that the font worked for some sizes ... retried it with Java setting certain sizes.
Online converted to a printer font format and back to TTF first, as I thought chances would be better than converting from one true type format to another. But the resulting font worked for normal characters and for some out of the unicode range. But unfortunately the most important unicode characters simply showed white in the propeller tool then.
By the way .... someone from Parallax reading this? If I'd release the PropellerHub software somewhen, would you allow me to bundle this converted Parallax font?
This evening I added a Java-class which converts input in the range 0-255 to the proper propeller characters ;o)