Shop OBEX P1 Docs P2 Docs Learn Events
CODE block font — Parallax Forums

CODE block font

David BetzDavid Betz Posts: 14,516
edited 2011-10-28 14:26 in General Discussion
Did the font used for CODE blocks change recently? The font is way too big. You can't see enough code at once. Is there any way to change back to the previous font or a smaller version of the new font?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-26 10:33
    This is something that Bump is already working on. The default font for code blocks is the Parallax font, so that the special characters will show up in Spin code. But the font size is too large, or the code box is too small. I'm sure we'll see a fix in short order.

    -Phil
  • David BetzDavid Betz Posts: 14,516
    edited 2011-10-26 10:42
    Thanks for the explanation. I vote for making the font smaller rather than the text box bigger. I like to be able to see as much code on my screen at a time as possible and a large font gets in the way of that. It's especially bad because wide lines can't be seen without horizontal scrolling or wrapping both of which are ugly.

    Is there any chance you could switch the forums back to the font we were using before while you work to resolve this problem?

    Thanks,
    David
  • BumpBump Posts: 592
    edited 2011-10-26 13:07
    Yeah I can bump it back, it's a fun problem. 12pt is the Parallax font's optimal display size, to get all the features to play nicely, however it is also freaky big. I've put it back to its default size for bbccode_code block text.
    Still checking other things to make all these features 'sing'... do features have vocal chords? I'm not sure anymore.
  • David BetzDavid Betz Posts: 14,516
    edited 2011-10-26 13:11
    Thanks for putting it back while you resolve the issues with the new font! I guess the Parallax font must be a bitmap font not an outline font?

    Is there any way to add a new tag to the forum software? Could you use [PARALLAX] for code that requires the Parallax font?
  • BumpBump Posts: 592
    edited 2011-10-26 13:11
    Whoa found another interesting issue to figure out, sorry for making a note of it here to myself... After replying to a thread, hitting reply to thread again (on the same thread) skips quickreply and goes straight to advanced reply.

    Anyway, it appears what I was told may be wrong; I think the Parallax font looks ok small... but difficult to read easily.
    =============================================
            Connection Diagram
    =============================================
    
            ┌──────┐   
            │      │   R0   D0      
            │    Px├───────┐
            │      │           │
            └──────┘           
            Propeller
               MCU
            (P8X32A)
    
    Components:
    R0 = 100Ω
    D0 = Blue LED, 3.2V @ 20mA
    Px = Desired Propeller Pin
    
    =============================================                  
    }}
    

    another addition for personal reference since I'm making corrections directly rather than on my test-site... bad Bump.
  • BumpBump Posts: 592
    edited 2011-10-26 13:12
    David Betz wrote: »
    Thanks for putting it back while you resolve the issues with the new font! I guess the Parallax font must be a bitmap font not an outline font?

    Is there any way to add a new tag to the forum software? Could you use [PARALLAX] for code that requires the Parallax font?

    That's a way easy suggestion, I could play with that also.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-26 13:14
    Bump wrote:
    ...do features have vocal chords?

    Did you (of all people) ever really doubt that?

    http://www.youtube.com/watch?v=QH2-TGUlwu4

    -Phil
  • David BetzDavid Betz Posts: 14,516
    edited 2011-10-26 13:20
    Bump wrote: »
    Whoa found another interesting issue to figure out, sorry for making a note of it here to myself... After replying to a thread, hitting reply to thread again (on the same thread) skips quickreply and goes straight to advanced reply.

    Anyway, it appears what I was told may be wrong; I think the Parallax font looks ok small... but difficult to read easily.
    =============================================
            Connection Diagram
    =============================================
    
            ┌──────┐   
            │      │   R0   D0      
            │    Px├───────┐
            │      │           │
            └──────┘           
            Propeller
               MCU
            (P8X32A)
    
    Components:
    R0 = 100Ω
    D0 = Blue LED, 3.2V @ 20mA
    Px = Desired Propeller Pin
    
    =============================================                  
    }}
    

    another addition for personal reference since I'm making corrections directly rather than on my test-site... bad Bump.

    That size is definitely better.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-26 13:26
    Bump,

    I wrestled with this issue for the Spin autodocumenter. I settled on this for my pre CSS:
    pre {
    font: 10pt parallax,courier,monospaced;
    line-height: 97%;
    }

    This is what it looks like:

    attachment.php?attachmentid=86357&d=1319660731

    Below 10 points, the font starts to look pretty crappy.

    -Phil
    804 x 312 - 5K
  • BumpBump Posts: 592
    edited 2011-10-26 13:49
    Yeah, that's how we ended up working it on the parallaxsemiconductor site before finally deciding upon 'going big'; it seems to work on the forums just fine though.
    Heh, did quoting code always make it look all jagged? That's easy to fix too.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-26 13:58
    You mean putting code in [noparse]
    [/noparse] blocks?

    -Phil
  • BumpBump Posts: 592
    edited 2011-10-26 14:02
    You mean putting code in blocks?

    -Phil
    Bump wrote: »
    =============================================
            Connection Diagram
    =============================================
    
            ┌──────┐   
            │      │   R0   D0      
            │    Px├───────┐
            │      │           │
            └──────┘           
            Propeller
               MCU
            (P8X32A)
    
    Components:
    R0 = 100Ω
    D0 = Blue LED, 3.2V @ 20mA
    Px = Desired Propeller Pin
    
    =============================================                  
    }}
    

    Yes, that. The font-style for quote_container is italics which makes all the diagrams in the code get all freaky-deaky, but if I force it all normal than any intentional styling could be lost.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-26 14:38
    Ah, I see what you mean. I don't really see that as a big problem. At least I've never quoted an entire code block. IMO, doing so is an abuse of the quote tags.

    BTW, if you can do it, boldface type in a code block should have letter-spacing set to -1px. The reason is that the Parallax typeface does not come with a bold font that preserves character width, but shifts each normal character right and overlays it with itself to make it look fatter, and that increases the character width by one pixel. The -1px adjustment for bold characters undoes this. Here's an example of the problem:
    xxxxxxx    aligned
    xxxxxxx    aligned
    [b]xxxxxxx[/b]    not aligned
    

    -Phil
  • BumpBump Posts: 592
    edited 2011-10-26 16:19
    Yeah, I could work that out.
  • BumpBump Posts: 592
    edited 2011-10-28 14:19
    xxxxxxx    aligned
    xxxxxxx    aligned
    [B]xxxxxxx[/B]    aligned
    

    Don't make me look silly vbulletin...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-28 14:26
    Perfect! Thanks, Bump! Now you can enjoy your weekend.

    -Phil
Sign In or Register to comment.