Page MenuHomeFreeBSD

loader: use display pixel density for font autoselection
ClosedPublic

Authored by tsoome on Feb 22 2021, 9:14 AM.
Tags
None
Referenced Files
F112057325: D28849.id84441.diff
Wed, Mar 12, 5:23 AM
F112054215: D28849.id84437.diff
Wed, Mar 12, 4:15 AM
F112013743: D28849.diff
Tue, Mar 11, 2:09 PM
Unknown Object (File)
Tue, Feb 25, 11:15 AM
Unknown Object (File)
Sun, Feb 23, 10:21 PM
Unknown Object (File)
Sun, Feb 23, 5:14 PM
Unknown Object (File)
Fri, Feb 21, 5:52 AM
Unknown Object (File)
Tue, Feb 18, 7:33 PM

Details

Summary

Calculate font size from 16 density independent pixels (dp) by using:
size = 16 * ppi/160 * display_factor

We are specifying font size 16dp, and assuming 1dp = 160ppi.
Also apply scaling factor 2 (display_factor).

Test Plan

test with different systems and resolutions

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 37258
Build 34147: arc lint + arc unit

Event Timeline

use gop_handle, not gop protocol

make it actually to work...

Works for me, now the font seems fine on a 2160p monitor, and there's no black bar at the bottom of the screen.

Don't really have much knowledge in this area to provide a meaningful review I'm afraid.

stand/efi/loader/framebuffer.c
506

size = MAX(sizeof(*edid_infop), edid->SizeOfEdid);

This revision was not accepted when it landed; it landed in state Needs Review.Feb 27 2021, 9:28 AM
This revision was automatically updated to reflect the committed changes.