-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Unicode Box Drawing characters with ASCII characters #271
Conversation
Is it possible to figure out that this is an ASRock board and conditionalize on that? I'm really hesitant to make this look worse for everyone else because of one vendor of super-low-quality motherboards. |
One somewhat horrifying approach - draw a box character, read back the framebuffer, see whether it looks like a box character? |
Many ASRock boards will not render MokManager correctly if the Unicode Box Drawing characters are used. Signed-off-by: Tony Persson <tony@tonypersson.se>
99c4cfa
to
adf34cd
Compare
Turns out you can use the return value from |
@vathpela can this be undrafted? or is this somehow not appropriate to go in? |
co->SetCursorPosition(co, start_col, start_row); | ||
Line[0] = boxdraw[0].up_left; | ||
Line[1] = L'\0'; | ||
char_set = co->OutputString(co, Line) == 0 ? 0 : 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UEFI Specification Version 2.8 Errata B does specify the BOXDRAW characters as mandatory. As per the Spec's page 448, the Status Codes that can be returned here are EFI_SUCCESS, EFI_DEVICE_ERROR, EFI_UNSUPPORTED, and EFI_WARN_UNKNOWN_GLYPH.
I would prefer to test for EFI_WARN_UNKNONW_GLYPH (and if that's in fact what is returned on ASRock) and then switch to the other character set based on that.
Also it would be nice to retest that the one one works and doesn't also return EFI_WARN_UNKNOWN_GLYPH in case the firware just returns that always irrespective if it was successful or not.
Pushed with a minor fix (WCHAR vs CHAR16) as e5bf2ba. |
Solves #177. Many ASRock boards will not render MokManager correctly if the Unicode Box Drawing characters are used. This PR replace the
BOXDRAW_
characters with ASCII characters.I'm not sure how many systems are affected by this problem, so I can't say if ugly ASCII boxes are worth it. A nicer solution would be to detect the issue and use ASCII as a fallback, but I'm not sure if that's possible.
Tested on an ASRock X399 Taichi.