Shop OBEX P1 Docs P2 Docs Learn Events
Forum Issue: [code] tags — Parallax Forums

Forum Issue: [code] tags

Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
edited 2015-08-06 20:57 in General Discussion
The
tags in the preview forum create a code box wherein certain characters are displayed with their HTML-coded equivalents instead of the actual characters, viz:[code] $fff == $800)
value := $1_0000
elseif (x && $800)
value := word[SINE][-x && $7ff]
else
value := word[SINE][x && $7ff]
if (x && $1000)
Also, it would look nicer if the background were a little more subdued (I recommend #FFFFE0) and if the font defaulted to Parallax instead of Courier.
-Phil

Comments

  • If we do end up with Parallax as the default, it would be good to put a link to that font somewhere prominent.


  • Courtney JacobsCourtney Jacobs Posts: 903
    edited 2015-07-31 16:42
    We discussed the Parallax font but have decided against using it; current settings are how we intend code to be displayed.

    Code background colour probably will change because it currently is very bright. I posed it to Bump and Jen J and they started up a lively discussion about colours.

    I will add the code HTML issue to the issues list for the staging site, then I will sink this thread.
  • RDL2004RDL2004 Posts: 2,554
    edited 2015-07-31 16:44
    It doesn't look like Courier on my computer. It actually looks like Bitstream Vera Mono because it has the differentiated "lower case L" and "one" and it has the dot in the center of the zero to avoid confusion with the letter O.

    edit: Interesting. On a Windows 7 computer with Pale Moon browser, the font is completely different. Still definitely not Courier though. I wonder how what font to use is determined? I guess it's up to the browser?
  • According to Bump there is a list of defaults based on what device you use and fonts you have installed.

    They are all of the same font style, meant to accommodate various user settings. Most casual users will see Courier New or Courier.


  • Heater.Heater. Posts: 21,230
    edited 2015-08-06 20:55
    Selecting raw HTML entry mode and entering code between pre tags does not fair any better:
    if (a < b && c > d)
    {
    x = &
    }
    
    Well, that came out better than I expected. Except taking the address of (ampersand) the variable whose name is "amp" failed.
  • That's more interesting, since both computers have Courier and Courier New available, yet neither are being used as the code font.
  • potatoheadpotatohead Posts: 10,261
    edited 2015-07-31 16:53
    The Mac I am using right now has browser defaults for serif, sans-serif, and monospace.

    I can set 'em to whatever I want, and pages that do not specify fonts render with those defaults.  If a page specifies a font, and it's present, then that font is used.  If it's not present, then it appears the defaults in the browser are used.

    I'm seeing Courier in the examples above.  Even the one with the character representation error.
  • This computer's browser (a very old Firefox on a very old Linux Mint) is not set for any specific font, just Monospace: monospace. The other computer (Pale Moon on Windows 7) actually has monospace set to Courier New. Both browsers are checked to "Allow pages to choose their own fonts instead of my selections", yet I get Courier New as the code font on neither. Not complaining though, both are using something far better for code than Courier.
  • Please note no changes (including font changes) have been made to this production site. Only to the staging site.


Sign In or Register to comment.