EmulationStation icon indicating copy to clipboard operation
EmulationStation copied to clipboard

Setting for font size scaling (for small displays)

Open zigurana opened this issue 7 years ago • 11 comments

Maybe it's my eyes getting older, but I have a portable device running at 320x240 px, and the default font size for ES are just terribly small.

This is at real-size (100% scaling): tinyfont The regular dark menu text on light bg is just doable, but the help texts (using FONT_SIZE_SMALL) are unreadable to me.

I would like to see a setting (if only in the es_setting.cfg) that allows the user to ramp up the scaling, at least to ~150%.

I appreciate that this will probably wreak havoc on the already crowded menus but being able to see the first bit of a menu item, is already better than seeing none at all. Plus: there is a scroll function we use for Game Titles, so why not for the currently selected menu?

I will gladly look at this myself at some point, but my plate is getting quite full, and this might be a nice smallish project for someone who wants to try their hand at working on ES coding. So this issue is raised as an invitation to contribute, and if there are no takers, as a reminder to myself to pick this up later.

Entry point: https://github.com/RetroPie/EmulationStation/blob/master/es-core/src/resources/Font.h#L14 and further.

zigurana avatar Oct 18 '17 22:10 zigurana

@zigurana a few questions:

  • is the device you are using have an SPI Screen ?
  • Are you using fbtft and fbcp combo?
  • Have you modified config.txt to set HDMI out and changed resolution to 320 240?

hex007 avatar Nov 15 '17 19:11 hex007

Hey, My device is a Raspiboy (www.8bcraft.com) which uses this screen. Its being connected to the pi zero via the FPC connector. HDMI is not being used, and the config file specifies the framebuffer width and height at 320x240. I don't think I am using fbtft, isn't that spi specific? In any case, the issue is not (only) with the size of the screen, the size ES fonts are rendered at is just too small for these screens.

zigurana avatar Nov 15 '17 19:11 zigurana

I've ordered a raspiboy but don't have an ETA of when it gets here but when it does I'll be able to at least help out testing

HerbFargus avatar Nov 15 '17 20:11 HerbFargus

@zigurana Is it a DPI screen or composite?

hex007 avatar Nov 15 '17 21:11 hex007

I see that it is composite. This is how my screen looks like on PAL. The photo is not enhanced at all. The layout difference is an indicator that something is different. Could you try manually executing the binary with resolution params

emulationstation --resolution 320 240

I am guessing that this is not the correct resolution as you are on Composite. It is most likely 720 x 576 PAL or 720 x 480 NTSC

Also post a screenshot while displaying the FPS counter. It is an indicator of layout problems

img_20171115_135351

hex007 avatar Nov 15 '17 21:11 hex007

Hi, thanks for the suggestions. I am sure it is a 320x240 screen driven via the composite signal.

I appreciate your efforts to troubleshoot my particular screen, but the issue I am aiming at is not there.

When we look in the font size definitions (font.h lines 16-19), we see that the medium font is defined as 0.045 * screen height. For low res screens, running at 320x240, this corresponds to 10.8 pixels for the 'S' character.

In general, it is agreed that text needs to be 12+ pixels to be legible, 16px for easy reading (16px = 12pt).

Now, I am not suggesting that we increase the default font size, as it looks fine on screens with sufficient resolution.

What I am suggesting is to implement a lower limit for font size, defined in pixels, so that low-res screens remain functional.

zigurana avatar Nov 16 '17 08:11 zigurana

@zigurana i would like to let you know this.

  • if you are using composite, your resolution is not 320x240
  • the resolution that the pi puts out is constant based on which sdtv mode you use. Ntsc has 720*480 and PAL has 720*576.
  • the display IC is responsible for scaling it to 320*240
  • to confirm this please launch ES via command line with resolution parameters.

I understand what you are saying. But the menu looks different for me so I am trying to get your settings so I can mimic the effects. Thus i can run tests to see if my patch would work as expected.

Kindly post your config.txt file

hex007 avatar Nov 16 '17 16:11 hex007

Well, turns out you are right! This is what my screen looks like when running emulationstation --resolution 320 240: img_20171116_205926418

So it's the display itself that downsamples the signal from composite PAL/NTSC to 320x240 ?

The config file is the same as here: Showing only the active lines

overscan_left=-6
overscan_right=-6
overscan_top=-15
overscan_bottom=-15

framebuffer_width=320
framebuffer_height=240

dtparam=audio=on
gpu_mem_256=128
gpu_mem_512=256
gpu_mem_1024=256
overscan_scale=1

dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4  

BTW: the framerates hover at 60FPS, dropping occasionally to 30-40 when I scroll through gamelists with some metadata.

zigurana avatar Nov 16 '17 20:11 zigurana

So it's the display itself that downsamples the signal from composite PAL/NTSC to 320x240 ?

Yes, The display IC is configured some how to know the display resolution and scales incoming frames to that resolution. Bad scaling causes blurriness. Hence DPI/SPI screens are sharp. They scale better (SPI) and mostly output exact frames (DPI).

How about uncommenting the sdtv_mode=2 and trying PAL mode compared to current NTSC mode that you are using.

Also post photos of both modes showing the Framerate data. That is a good indicator of bad layout settings.

hex007 avatar Nov 16 '17 21:11 hex007

Well, the PAL mode was a disaster, no image whatsoever. Only whiteout and crap at the top. There is no observable difference between the two NTSC modes (0-1).

zigurana avatar Nov 16 '17 22:11 zigurana

I guess this might be restricted to 8Bit PCBB. Do you have another setup with 3.5 inch composite display you can try the same sdcard with (preferably a BW type screen.)? That might give an idea of what is going wrong. Try PAL mode on said display too.

Another thing to try is to get the exact resolution ES is running on 8bit PCB. Try --resolution 720 480 to see if it spans the entire screen.

Let me know what you find.

hex007 avatar Nov 16 '17 23:11 hex007