Shop OBEX P1 Docs P2 Docs Learn Events
Parallax font problem — Parallax Forums

Parallax font problem

MagIO2MagIO2 Posts: 2,243
edited 2012-11-04 09:35 in Propeller 1
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?

Comments

  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-02-04 11:16
    If anyone is curious, I've attached the font preview from my Windows 7 computer.
    942 x 478 - 36K
  • MagIO2MagIO2 Posts: 2,243
    edited 2012-02-04 11:46
    Thanks a lot Circuitsoft!

    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.
  • pedwardpedward Posts: 1,642
    edited 2012-02-04 13:25
    Last time someone brought this up, the problem was that you had to uninstall and reinstall the font, evidently Windows somehow corrupted the records. I suspect that Windows takes the raw font and compiles it to some intermediate format, and that is corrupted.
  • MagIO2MagIO2 Posts: 2,243
    edited 2012-02-09 12:03
    Removed the font and installed the 1.3 version of the propeller-tool. Same problem. How can this be? Some inconsistency in the font-file?

    Someone who can convert it back and forth to check whether the result is maybe better?
  • pedwardpedward Posts: 1,642
    edited 2012-02-09 13:43
    This page seems to offer some useful tips: http://word.mvps.org/faqs/apperrors/commonfontprobs.htm
  • MagIO2MagIO2 Posts: 2,243
    edited 2012-02-14 14:48
    Jay ... finally I found a way. Ok ... not solved in the sense of 'now I know what's wrong with the font' ... but hey ... I'm happy ;o)

    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?
  • MagIO2MagIO2 Posts: 2,243
    edited 2012-02-15 12:27
    Just want to share with you because I'm really happy to be on the edge of having a terminal that works with the propeller font.

    This evening I added a Java-class which converts input in the range 0-255 to the proper propeller characters ;o)
    640 x 400 - 45K
  • MagIO2MagIO2 Posts: 2,243
    edited 2012-11-04 08:46
    After a while of distraction, I'm back to this project and want to show those who are interested, what the font thing was meant for. In the picture you see a terminal-tab connected to a propeller via serial interface. This is a simple screen-tab which gives the propeller full access. In future I plan to have other types of panels with "Updaters" that simply read raw data and do whatever conversion is needed.
    800 x 500 - 43K
  • jazzedjazzed Posts: 11,803
    edited 2012-11-04 09:35
    That looks great. :)
Sign In or Register to comment.