-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[help] update vgfont/font.c to be compatible with utf-8 #896
Comments
it's not part of openvg beingcompatible with utf-8, openvg deals only with the rendering of the glyphs and provides a simple indexing of the path glyphs, but the decoding of the text string is not the purpose of the library |
I think this is not Raspberry firmware related. You might want to check out Paeryn's fork of ajstark's OpenVG library. There is a test program included that displays every character found in a font, it also mentions UTF-8. You need to set locales in your system and inside your program accordingly. |
On https://github.com/raspberrypi/firmware/blob/master/opt/vc/src/hello_pi/libs/vgfont/font.c hello_font example wont render latin characters. |
@nagualcode no need to importunate popcornmix for this, that example is not part of OpenVG: it is an example that uses OpenVG. |
Agree... "the original libshapes.c has a routine that converts a character at a time from a utf-8 string into the individual 32-bit integers needed (next_utf8_char()). For the branches from newfonts upwards I changed it to use the standard mbsrtowcs() function (multi-byte string to wide-char string) so whatever format the current C_locale is set to is used (utf-8, utf-16, etc.). |
I am trying to render fonts on the framebuffer, and I would ask for some help with the path to make vgfont/font.c compatible with utf-8.
The text was updated successfully, but these errors were encountered: