Shop OBEX P1 Docs P2 Docs Learn Events
PST and propeller font — Parallax Forums

PST and propeller font

MagIO2MagIO2 Posts: 2,243
edited 2011-01-11 16:07 in Propeller 1
Why is PST not using the propeller font? In my current situation this would make sense as I'd like to send logic-levels measured on propeller pins to the PST and I don't understand why PST is not using that font which has perfect characters for that.

Is there a possibility to switch to propeller font? Is there a terminal tool which can use the propeller font?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-10 12:41
    One reason the Parallax typeface is not used here might be that it does not scale well to small font sizes.

    -Phil
  • MagIO2MagIO2 Posts: 2,243
    edited 2011-01-10 12:43
    Hi Phil,

    I don't understand your comment. The propeller tool also uses the propeller font. I don't mean the original font stored in propeller ROM, I mean the same font that's already used by the propeller tool.
  • JonnyMacJonnyMac Posts: 9,235
    edited 2011-01-10 12:51
    Jeff Martin put the effort into creating the TTF file so that the symbolic characters could be used in listing to help document a project. Phil is right, though, the font has a limited scaling range.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-10 12:56
    MagIO2,

    Yes, I understand: I was referring to rendering on a PC. However, upon reexamination, the Parallax typeface doesn't look all that bad at 8 pts. It looks really crappy at 6 pts., but what typeface doesn't? It does not look good at 11 pts, but that's not an option in PST.

    You also have to realize that, on a PC, you have to specify the Unicode value for the upper characters, not their Propeller $80 .. $FF equivalents, although a terminal program could easily do that translation for you.

    -Phil
  • RaymanRayman Posts: 14,999
    edited 2011-01-10 13:16
    You can use the Parallax ttf font with Hyperterminal. Just tried it...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-10 13:32
    Rayman,

    Do you have to do anything special to display the upper glyphs?

    -Phil
  • RaymanRayman Posts: 14,999
    edited 2011-01-10 15:02
    Sorry, I don't actually use Hyperterminal anymore, I just use PST. I just dug up HT to see if would let me select other system fonts and it does...
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-10 15:45
    It would be great to be able to use the prop font. A long time ago I wrote a datalogger which sent the results to the PC, stored in a file for display in PropTool so that I could see the timing. This would be much better.

    BTW Hyperterminal can be added to XP and I presume Vista. You will have to google to find out how (also in a prop thread too).
  • MagIO2MagIO2 Posts: 2,243
    edited 2011-01-10 23:30
    Thanks for all the input.

    I don't use Hyperterminal because it always reseted the propeller when you attach it to the serial connection. This is of course not the best idea, when you load the programs to RAM, which is my favourite for testing. And on my new Win7 Netbook it's not even installed.

    I just wondered if there might be a trick (command line parameter) or a hack to tell PST that it should use the propeller tool font instead. I don't know windows programming. Is PST simply using some kind of default font or could one possibly hack the font name inside of the executable?

    This would simply be a cheap n easy way to get a logic analyser.
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-10 23:58
    Is the PST open sourced. I could not find any info but as Parallax were opening up some of their tools perhaps this could be a possible solution.
  • idbruceidbruce Posts: 6,197
    edited 2011-01-11 14:16
    MagIO2
    I just wondered if there might be a trick (command line parameter) or a hack to tell PST that it should use the propeller tool font instead. I don't know windows programming.

    A lot of that would depend if the font is embedded within the exe. If it is embedded as a resource, then the function UpdateResource should probably do the trick, but I think there are some prerequisites. I will look into it for you.

    Bruce
  • idbruceidbruce Posts: 6,197
    edited 2011-01-11 15:16
    MagIO2

    Without digging to deep, it appears that UpdateResource would do the trick. First you would have to "enumerate" the font type resources in the serial terminal just to get the name of the resource, then should be able to update the font.

    Bruce
  • idbruceidbruce Posts: 6,197
    edited 2011-01-11 15:27
    MagIO2

    The Parallax Serial Terminal depends upon GDI32.DLL, which has a lot of font functions. It would be my guess that pst loads a stock font instead of having it as a resource. If this is the case, I think the only possible way to do it would be to create a system hook that would capture the call to the font creation, and this would be a true pain in the rear. It would probably be easier to create your own serial terminal with the font you want.

    Bruce
  • tdlivingstdlivings Posts: 437
    edited 2011-01-11 15:52
    Yes it is Open Source and on the Parallax site.
    Thank You Parallax for that and the fun looking at it.
    It is a Delphi Application and I would guess Delphi 6 because the propellent.dll source is Delphi 6.

    I loaded the PST project into Delphi 2007 and it compiles and runs, by that I mean puts up a terminal window and responds to mouse clicks on things. I did not connect it to anything serial but do not see why it would not still work.
    The font is not Parallax and it would take less than a minute to change it and re-compile and it would work as is with a different font, assuming Jeff did not have a side effect like scaling the chars in the chosen font.
    BUT the bad news on the special drawing chars is there not going to work because they are Unicode ie
    two chars per character. Also the version of Delphi it was written in and even Delphi 2007 know nothing about
    Unicode. So displaying the characters in the receive window using Canvas.TextOut(some string) is not going to work.

    Delphi 2009 - Delphi XE are Unicode and I could re-compile it under XE but there are issues.
    Sure now Canvas.TextOut could display them but now all Chars are two bytes and character counting is
    off in receive buffers. I do not think having everyone switch to sending two bytes per char serially is a good idea. You could fix that by rewriting the PST to be Unicode aware. Would take some planning on how to decide when it is one byte or two bytes per char.

    I like the idea of using the using the Parallax font for a simple logic analyzer and maybe a seperate
    window that knows about Unicode and gets a serial message would be a way.
    Or like the old Word Star idea for formatting remember cntrlB This is now Bold CntrlB Bold now off.
    So cntrlU Unicode to draw coming cntrlU all done sending Unicode.

    Thinking outloud is dangerous Ha
    Tom
  • Cluso99Cluso99 Posts: 18,069
    edited 2011-01-11 16:07
    Yes, now I recall that I had to send 2 bytes per char. But the CtlU method should work fine and save the number of characters being sent too.
Sign In or Register to comment.