-
Notifications
You must be signed in to change notification settings - Fork 197
Support Freetype+Harfbuzz #748
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
Comments
@pureexe do RPG Maker 2000/2003 Thai-scripted games exist? (Apart of your translation). |
For now, We don't have any Thai scripted game created with RPG Maker 2000/2003 yet. but 12x12 is enough for display thai character. this is yanderella with nearly correct thai language display. We use moded RM2000 font you can download it here. https://www.dropbox.com/s/n6w75c3m0sv5c7n/rm2000.fon?dl=0 and run with this game file (this is test not full game so file just 4MB) http://www.mediafire.com/download/yz4yjzzeiqo9fdz/yanderella-thai-test.rar |
Could you write this text normally here on github? |
กาลครั้งหนึ่งนานมาแล้ว |
Okay by measuring I would say that we need at least 22 pixel of height to fit everything with something above (รั้) and below (ญิ) beautifully. Needs some testing if freetype can somehow squash this in less. I think the long term solution for this is to modify the whole rendering code of the Player to render with more pixels... |
@pureexe how readable would you consider this? It is just a font rendering test using a fixed width font (Arundina Sans Mono) using freetype+harfbuzz at 11 px height (with auto width), seems to fit exactly 6 px width as RPG_RT does, which is good. |
@fdelapena wow! pretty good. |
@fdelapena That's great! It seemed to display perfectly. Only that the fonts looked a bit blurry but that's not a big problem anyways. Thank you for showing that to us! We will looking forward to see RM2000/2003 to be able to support Thai perfectly. |
@whateverzone @fdelapena |
@Ghabry Wow! Thank you for telling me that! Thank you very much for helping us ^^. |
@Ghabry |
@pureexe |
@Ghabry @whateverzone |
@pureexe Yes, I do. |
Update for the Thai people. Working again on this, hope I can get some results soon ^^ (around November) |
Thank you for working on this again. |
Hello! It's been a while. I just wondered if you are still working on this or not. |
Works now in message boxes. Due to tecnical reasons (need to split at most \-command codes) the rendering gets worse as I can't render in one go. To fix this I would need to analyze the right part of the bounding box and crop the empty rows :/ Well and some stuff just can't be simulated because Freetype moves some glyphs below others for esthetics. Using a different "Hinter". Does this look better or worse? |
About the configuration. I don't want to support font-config or any font substitution now because have no idea how to use this and not worth the afford by now imo. I would propose a configuration in the RPG_RT.ini:
The font depends on which Font is selected for the system graphic. When one font is not defined it uses the normal built-in one. Assuming the System graphic Font is the 1st this will look in the "Font" folder of the game for Arial.ttf and Mincho.ttf and render Arial glyphs with size 12 and when a glyph is missing in the font it renders a Mincho glyph with size 11. As a "flow chart":
Same for the command line: |
WIP Harfbuzz branch: https://github.com/Ghabry/easyrpg-player/commits/harfbuzz Wasn't that hard. Only lost two hours because I forgot to divide Size calculation has some bugs and it doesn't work for the message box yet. The message box is hard to do because the text appears glyph by glyph and it has all this command processing etc. Comparison (click to enlarge): Left is w/o HB, Right is w/ HB The Thai rendering of the stacked glyphs is correct now (trust me, I compared this with SDL_TTF and in Chrome ;)) Spot the difference ;) (look for ligatures and letters that are "moved under" other letters like e.g. in case of 'To') |
Added (Experimental) shaping support for Window Message. Even works properly for color codes etc. :) Sans Serif vs. Serif: กาลครั้งหนึ่ง @pureexe better late than never I guess 🤔 |
Looking good! |
Will be needed to handle complex scripts that use combining diacritic marks.
The text was updated successfully, but these errors were encountered: