coavins / mhrise-coavins-dps

A detailed DPS meter for Monster Hunter Rise (PC)
GNU General Public License v3.0
24 stars 11 forks source link

CJK characters show as question mark (?) #13

Closed liu2g closed 2 years ago

liu2g commented 2 years ago

Describe the bug When there is player with name that has CJK characters, the name on the bar shows with question marks (?)

Steps to Reproduce For example:

  1. Configure the UI with the generated GUI
  2. Enter quest where there is player with name that has CJK characters
  3. Name on the DPS bar shows ???

Expected behavior Name should show exactly as is in the game

Screenshots See below. The display looks fine except the LBG user 究極白毛控, which shows as ????? image

REFramework commit hash (if known): 066d6993

coavins commented 2 years ago

Thank you for the report. This is a known reframework issue and is being worked on. See pull request praydog/reframework#213 for details.

praydog commented 2 years ago

Font improvements branch was merged to REFramework master. It has the possibility to render these characters, but you need to manually specify a range of characters and font.

Plugins system was also merged to master.

@cursey has made a plugin to add better rendering APIs without modifying REFramework. This one doesn't need to manually specify a set of characters to render. https://github.com/cursey/reframework-d2d

Feedback on both of these would be appreciated, and if they meet your needs.

cursey commented 2 years ago

Thank you for the report. This is a known reframework issue and is being worked on. See pull request praydog/REFramework#213 for details.

I have merged this PR into master. And it does enable support for other languages, but it is tedious as you have to provide a compatible font and specify the Unicode character ranges you wish to load from that font. This is just simply the way ImGui works, and it's far from ideal.

That is why I created a plugin, the one @praydog linked, https://github.com/cursey/reframework-d2d. It lets you specify just a system font, and will work with any language even if the desired font doesn't support those characters (it will just choose a font that does support them). The rendering quality is also quite a bit higher than base ImGui rendering (if you care about that sort of thing).

I will release this plugin on nexus as soon as the next version of REFramework is released on nexus and fully plan on supporting this plugin for overlay style mods going forward.

Releases are here: https://github.com/cursey/reframework-d2d/releases

coavins commented 2 years ago

Resolved by 87bec78

Thank you @cursey and @praydog for your incredible work.