Skip to content
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

[text.] LoadFontEx Latin Character - Urgent!!! #905

Closed
cf-isys opened this issue Jul 10, 2019 · 5 comments
Closed

[text.] LoadFontEx Latin Character - Urgent!!! #905

cf-isys opened this issue Jul 10, 2019 · 5 comments

Comments

@cf-isys
Copy link

cf-isys commented Jul 10, 2019

Issue description

I am test the new versión 2.5.0 and the text function not show Latin Character (áéíóúñ). With the versión 1.8 you tell me that use this:

#define FONT_TOTAL_CHARS    255
int defaultFontChars[ FONT_TOTAL_CHARS + 1 ];
char msg[ 256 ] = " Ññ Esta terminal está fuera de servicio ";
SpriteFont font = LoadSpriteFontEx( "segoeui.ttf", 32, FONT_TOTAL_CHARS, defaultFontChars );

now I replace whit this

#define FONT_TOTAL_CHARS    255
int defaultFontChars[ FONT_TOTAL_CHARS + 1 ];
char msg[ 256 ] = " Ññ Esta terminal está fuera de servicio ";
Font font = LoadFontEx( "segoeui.ttf", 32, &defaultFontChars, FONT_TOTAL_CHARS  );

But not work!!!!

image

Can you help me please!

Thank you very much!!!!

@raysan5
Copy link
Owner

raysan5 commented Jul 10, 2019

@cf-isys yes, that behaviour just changed to support full Unicode charset, just save the .c code file containing that string as UTF8, that should work.

@raysan5
Copy link
Owner

raysan5 commented Jul 10, 2019

@cf-isys Just reviewed this issue and did some tests, it works ok. Just three things to check:

  1. Code file should be saved as UTF-8
  2. Make sure your font supports Latin glyphs
  3. Use: LoadFontEx( "segoeui.ttf", 32, 0, FONT_TOTAL_CHARS);

Note that third parameter is used to provide requested characters list (as codepoints). If you just pass NULL (0), then it generates consecutive characters from 0 to FONT_TOTAL_CHARS.

@cf-isys
Copy link
Author

cf-isys commented Jul 10, 2019 via email

@raysan5 raysan5 closed this as completed Jul 11, 2019
@cf-isys
Copy link
Author

cf-isys commented Jul 15, 2019 via email

@raysan5
Copy link
Owner

raysan5 commented Jul 15, 2019

@cf-isys sorry, I can see any images. Please, could you review your message to remove mailing information? It makes it a bit complicate to read and focus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants