Page MenuHomeFreeBSD

loader: use display pixel density for font autoselection
Needs ReviewPublic

Authored by tsoome on Mon, Feb 22, 9:14 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
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 OK
Unit
No Unit Test Coverage
Build Status
Buildable 37337
Build 34226: 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
505

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