Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: johnny5 and font scaling  (Read 1610 times)

0 Members and 1 Guest are viewing this topic.

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
johnny5 and font scaling
« on: October 07, 2005, 12:52:57 pm »
From a thread in the controls.dat forum ( http://fe.donkeyfly.com/forum/index.php?topic=172.0 ) I learned about the following feature of Johnny5, that is not readily apparent from using the software.

One complaint I had about johnny5, is that you can't set the font size for each label the way you can in CPViewer. I wanted to be able to show the game title in a font much bigger than the font used on the button labels (because they would then become unreadable).
It turns out you can do this in johnny5: in the layout options screen, there are a few checkboxes, one is called something like "scale font to fit" and the other "scroll unusually long labels". Font scaling is what we want to use here.

When font scaling is enabled, the "global" font size that you adjust with the smaller/larger font menu can be thought of as the maximum for size for that family of labels.
- "maximum" because if the text won't fit in the label, johnny 5 will find a font size that fits (after using other tricks like wrapping text to the next line if the label space allows).
- "family of labels" because all button labels will end up with the same size which is very important, otherwise things look ugly.

In my case I set my font to something quite large, because I wanted a large title. The labels end up all the same size, and much smaller than the title because the label boxes are much smaller. I have the "miscDetails" in a large box at the bottom of my layout, which means that the font in that field varies greatly: when the description is short, the font ends up being quite large (same as the title) but when the description is very long (try one of the "720" games) the font can be very small, but at least you can read the whole thing wihtout it being cut off.
At first I thought I'd mind the varying font size in the miscDetails field, but it's actually just fine.

The alignment within the box (text wrapping) is still a bit weird sometimes, especially when the text is left-justified. There is often whitespace at the start of a line, which looks kind of weird. I ended up using centered text instead and it looks pretty good.



I admit that had I played with j5 more I probably would have discovered this cool feature, but my previous experience with scalable fonts (can't remember if it was in j5, buddamame or somewhere else) was that different labels had different size fonts, which is ugly, so I had  not even tried turning font scaling on in the latest johnny5)

As always, Tiger-Heli feel free to adpat this info on your web page on johnny 5.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19427
  • Last login:Yesterday at 11:22:04 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: johnny5 and font scaling
« Reply #1 on: October 07, 2005, 04:51:24 pm »
The whitespace you mentioned is usually a typo in the controls.ini

You need to check those out and report them.  (Usually caused by a stray space of something to that degree.)

papaschtroumpf

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 972
  • Last login:July 23, 2013, 11:41:10 pm
  • Have a Cow!
Re: johnny5 and font scaling
« Reply #2 on: October 07, 2005, 05:10:55 pm »
The whitespace you mentioned is usually a typo in the controls.ini

You need to check those out and report them.  (Usually caused by a stray space of something to that degree.)

Will do, well maybe, as you may have noticed, I reported all the typos I could find in the controls.ini on the controls.dat board, so I'll go hunting for extra spaces next, but the spell checking was rather tedious. so I may take a break for a few days first.