Comments (3)
You need to set a font that contains japanese characters. If these squares are drawn then it either means you passed an ascii string (not the case here because you have the L in front of all strings) or the font does not contain the glyphs that you need.
from tgui.
It can be get around by specifying the font file:
but the problem is, the SFML window title do not need this at all. wxWidgets also do not need explicitly setting the font.
There has to be a way to simplify the process.
from tgui.
The way that you won't have to set a font is when TGUI would ship with a font file that contained both english and japanese glyphs. But then at some point some other language would be needed as well so in order to support them all I would have to include a huge font file in the gui just for the few people who use some of these glyphs.
I don't know how the title or wxWidgets work but they probably use system fonts and may even use a different font depending on the locale of your pc. SFML isn't even responsible for the font in the title bar, that is something from the OS.
If you are going to use SFML then you are going to need to load a font anyway. I made it easy by including a font directly into the Gui class so that you can use it out of the box, but SFML doesn't even have a default font. If you want to render a text with SFML then you must load the font yourself.
But you do not have to set a font for all widgets. If at the beginning of the program you just call gui.setFont("font-filename");
then all widgets that are created afterwards will use this font. So you basically only need one line of code to support japanese text.
from tgui.
Related Issues (20)
- Autocomplete support for EditBox HOT 2
- Can not input CJK words HOT 9
- Black background shown when changing window size HOT 4
- How to customize the window's title bar and frame HOT 2
- How to implement a polygon window HOT 2
- Hover style does not disappear when mouse moves out of the window HOT 6
- Add a 2d chart or rendering 3d data for TGUI? HOT 1
- Chinese support? HOT 5
- Focus Issues HOT 1
- [ANNOUNCE] The TGUI now distributed via MSYS2 on Windows HOT 1
- CMake fails to install pkg-config files HOT 2
- On macOS, Input Method Editors(IME) behavior seems incorrect. HOT 6
- How to use SDL2/3 backend with cmake `FetchContent` HOT 2
- [Question] How to compile my first example of TGUI ? HOT 13
- [Bug] Dead radio button text HOT 3
- [Bug] Tabs state after disabled tab click HOT 2
- FileDialog documentation needs clarification and maybe working examples HOT 4
- Is there a C binding? HOT 12
- Raylib backend? HOT 15
- Cannot delete widgets inside of the gui-builder HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tgui.