# Font improvements: default font includes international characters, less embedded font data by default, fixes for font rendering on ancient machines

**URL:** <https://forum.castle-engine.io/t/font-improvements-default-font-includes-international-characters-less-embedded-font-data-by-default-fixes-for-font-rendering-on-ancient-machines/1008>\
**Category:** News\
**Created:** [November 30, 2023, 4:10pm UTC](https://forum.castle-engine.io/t/font-improvements-default-font-includes-international-characters-less-embedded-font-data-by-default-fixes-for-font-rendering-on-ancient-machines/1008 "2023-11-30T16:10:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [November 30, 2023, 4:10pm UTC](https://forum.castle-engine.io/t/font-improvements-default-font-includes-international-characters-less-embedded-font-data-by-default-fixes-for-font-rendering-on-ancient-machines/1008/1 "2023-11-30T16:10:08Z")

</div>

| [![X3D &quot;Hello Ukraine&quot;](https://forum.castle-engine.io/uploads/default/original/2X/b/b5fbc7de88271f2c59ccba0b9010107c9fbfef31.png)](https://castle-engine.io/wp/wp-content/uploads/2023/11/1_x3d_ukraine.png "X3D &quot;Hello Ukraine&quot;") |
| [![strategy_game unit design, using 3 TCastleText on each unit](https://forum.castle-engine.io/uploads/default/original/2X/0/0dfebcc39221659ae606f578dcb4d2cc106b6355.png)](https://castle-engine.io/wp/wp-content/uploads/2023/11/strategy_editor.png "strategy\_game unit design, using 3 TCastleText on each unit") |
| [![strategy_game demo using 3 TCastleText on each unit](https://forum.castle-engine.io/uploads/default/original/2X/4/49da36e7b0a67b4e74497c356e282d5ec0563803.png)](https://castle-engine.io/wp/wp-content/uploads/2023/11/strategy_game.png "strategy\_game demo using 3 TCastleText on each unit") |
| [![Localization test](https://forum.castle-engine.io/uploads/default/original/2X/b/b97fe0a457a47bc56967a72a7a2e9adb15609d35.png)](https://castle-engine.io/wp/wp-content/uploads/2023/11/localization.png "Localization test") |

Our usually-weekly news announcements have been quieter in November, I know. I blame it on me being somewhat exhausted from a ton of work and [talking about the engine](https://castle-engine.io/conferences) recently. But let’s get back on track, let me do some noise in the upcoming days about all things we did / are doing 🙂

Let’s start with _font and text_ updates.

1. Our default fonts, embedded in the engine, have been extended to include [over 2000+ common Unicode characters](https://github.com/castle-engine/castle-engine/blob/master/src/fonts/common_unicode_chars.txt) to cover most languages in the world. This means that, for most people, rendering the special characters in your native languages should _just work out-of-the-box_

This applies to all kinds of rendering. In particular using [TCastleLabel (2D, UI) and TCastleText (3D, in viewport)](https://castle-engine.io/manual_text.php). As long as you leave their `CustomFont` equal `nil` (default) to keep using the default font.

Rendering X3D / VRML (using any engine tool, like [view3dscene](https://castle-engine.io/view3dscene.php)) also now automatically shows local characters. Test e.g. [various international “Hello World” X3D examples from this page](https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/index.html) (open `.x3d` or `.x3dv` files linked from there in views3dcene).

Note that it doesn’t change what characters are present in your custom defined fonts. You still can (and should) customize the `TCastleFont.LoadCharacters` to include all glyphs from all languages you plan to support.

Almost all common glyphs are included, except the languages that have really typically a lot of characters: Chinese, Japanese and Arabic. If you find your language characters missing, [let us know](https://castle-engine.io/talk.php), and I will likely “just add a few more characters” to the default font. Unless your language has really a lot of specific glyphs.

2. The embedded 3D fonts have also a bit higher quality (generated with 25 size instead of 20).

3. To counter the explosion of font data in the engine (which could slow compilation time), we followed this with some cleanups:

4. We have also fixed rendering of fonts on ancient hardware, without OpenGL 3. 

Notes about things planned, but _not_ done here:

1. We want in the future to enable loading “on demand” additional font glyphs (for entire language sections) from font files. This would mitigate the current need to just embed a lot of font glyphs by default.

2. We want to finish [distance field fonts](https://github.com/castle-engine/castle-engine/pull/504) rendering method, to improve the font quality without the need for alternative font sizes.

### Share this:

- [Facebook](https://castle-engine.io/wp/2023/11/30/font-improvements-default-font-includes-international-characters-less-embedded-font-data-by-default-fixes-for-font-rendering-on-ancient-machines/?share=facebook "Click to share on Facebook")
- [Twitter](https://castle-engine.io/wp/2023/11/30/font-improvements-default-font-includes-international-characters-less-embedded-font-data-by-default-fixes-for-font-rendering-on-ancient-machines/?share=twitter "Click to share on Twitter")
- [LinkedIn](https://castle-engine.io/wp/2023/11/30/font-improvements-default-font-includes-international-characters-less-embedded-font-data-by-default-fixes-for-font-rendering-on-ancient-machines/?share=linkedin "Click to share on LinkedIn")
- [Reddit](https://castle-engine.io/wp/2023/11/30/font-improvements-default-font-includes-international-characters-less-embedded-font-data-by-default-fixes-for-font-rendering-on-ancient-machines/?share=reddit "Click to share on Reddit")
- Email
-
