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
Unknown Object (File)
Sat, Jan 18, 4:49 AM
Unknown Object (File)
Fri, Jan 17, 2:31 PM
Unknown Object (File)
Sun, Jan 12, 3:33 PM
Unknown Object (File)
Mon, Jan 6, 8:19 PM
Unknown Object (File)
Tue, Dec 31, 8:55 PM
Unknown Object (File)
Sun, Dec 22, 6:37 PM
Unknown Object (File)
Dec 21 2024, 3:56 PM
Unknown Object (File)
Nov 27 2024, 12:23 AM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.