Many people were asking us if Ventuz supports Far East scripts and writing.
The answer is simple: yes
If you use such fonts, you have to be aware of some points, because 3D-real-time rendering is not comparable to normal rasterization technologies used in 2D software. A ‘normal’ rasterizer (like Word, Flash or Photoshop) renders the actual character glyphs directly on the basis of the font file. The glyph gets pixelized during that process while some rasterizers use caching algorithms to speed up the actual rendering. Newest technologies like Direct2D™ or ClearView™ enhance the actual 2D rasterization drastically, but they are still not usable for our environment: 3D space in real-time.
For that reason Ventuz (and any other 3D-rendering system) have to convert the font data into formats usable by the graphics board directly (Direct3D™ or OpenGL). That means, the glyph outline information have to be converted into vertices (meshes) or textures (pixel glyphs) while applying certain visual effects like extrusion, bevel or blur – the Style. The final result of this conversion is stored on harddisk for easy and fast reload of this internal font format. In Ventuz, we call it the Font-Cache. You can find the cache folder in the common application data folder of your system:
Windows Vista and Windows7
C:\ProgramData\Ventuz\Fonts
Windows XP
C:\Document and Settings\All Users\Application Data\Ventuz\Fonts
If you need to re-convert (or re-generate) the font cache you can simply delete this folder. Ventuz will create it again as soon as a font is requested by the renderer.
Ventuz also requires the original font file to render fonts – even if the cache already has been generated for the required font and style. The font file contains further information such as character width, spacing, kerning. Ventuz uses two Windows APIs to access the actual Font file: Windows Presentation Foundation (WPF) and Graphics Device Interface (GDI+). Unfortunately there are a few differences between these two API’s: font styles (bold, italics, etc) are handled differently and are not compatible. Additionally, font files (like TTF or OTF) have multiple ways of describing a font: ISO, Windows, Mac, etc. Unfortunately, some fonts do not line-up all settings for all systems: a font marked as Bold for Mac could be marked as Regular for Windows. This issue brings up many problems in our Font-Engine. The easiest way to solve such font problems is to validate the font itself. A check, if the font works in MS Word or Photoshop doesn’t imply that the font is valid! Please use Microsoft Font Validator or the great FontCreator from High-Logic to validate your fonts. We’ve already seen many commercial fonts with such invalid settings – the usage of a validation tools always solved them.
A font file consists of outline description coming along with so called ‘mappings’. The mapping is the actual translation from the code page (ASCII, ISO, Unicode) to the glyph indices as well as the rules for combining multiple glyphs to one mapped character (special extensions or phonetic tones, like the German öüä). As long Ventuz is using Unicode mappings, some fonts do not provide the proper mapping tables. In such a case, Windows is doing a dynamic mapping for us, but this does not work properly for non-US (non-Latin) characters, because Unicode is the only complete mapping for all glyphs in the world (Cherokee and Samaritan included). Other mappings may not know about Chinese and Hangul glyphs and make it impossible to map the characters properly to Unicode. Therefore be sure that your font supports Unicode mapping if you want to use non-Latin languages.
A normal Latin font like Arial holds about 300 glyphs and a conversion to our font cache is fast and easy. Other fonts can hold more than 50,000 glyphs (Chinese, Japanese and Korean = CJK) and a font conversion can take up to 15 minutes!
Ok, time is not an issue if we only need to convert once. But memory becomes an issue! The font Arial Unicode MS holds the almost complete set of visual Unicode glyphs (about 50,000). Converting all glyphs to textures or meshes doesn’t make much sense if you only need a subset of it like Latin. Therefore we’ve implemented a CharacterSet filter (see Project Settings) to tell Ventuz which Unicode ranges you want Ventuz to convert into the cache. Unfortunately the breakdown of these ranges is not very handy, but is helps to separate Latin from Far-East and from historical or rarely used scripts. We’re planning to give more detailed options here in future versions.
The Character Set can reduce the number of glyphs converted into the cache, but what happens if you really need all glyphs? Chinese or Korean? In that case you have to handle to Font-Engine very carefully. We’ll try to give you some assistance:
1) First of all, you should be very clear about the fonts you want to use in your project. Use as less as possible (1-3)
2) Try to select Fonts containing only the glyphs you really need. If you want Korean (Hangul) for example avoid fonts holding all Chinese glyphs as well.
3) Make sure that all font files are valid by using a font validation tool as mentioned before.
4) Create a new empty project
5) Select only the Character Sets in the Project Setting you really need. Usually Latin, Symbols (and Special Language1 for Far-East)
6) Import them into your projects font folder and make sure that the actual file name has no special characters (only Latin or ASCII)
7) Create exactly the same amount of Font presets, including $Default for the fonts you want to use. In further Design step avoid any direct font references – only use the presets! This makes it also easier to change a typeface later by simply changing the preset.
8) ‘Develop’ the styles for your fonts. The recommendation for large fonts (CJK) is to use only MeshFonts, because
- Texture fonts (normal quality) require about 10 times more memory than the same font/typeface as Mesh. The complete Hangul-set for example needs about 200MB texture memory.
- Mesh fonts are always hard-edged and seamlessly scalable
- Try to avoid extrusion or bevel styles for mesh fonts because every bevel/extrusion tessellation will multiply the amount of vertices needed for the mesh font. A simple extruded font requires about 4 times memory if generated with all sides (front/sides/back)
- Texture fonts are faster to render and have additional effects like blur, but 12,000 glyphs placed on textures (Hangul) will make this advantage void. If you like to achieve effects like shadow, try to combine multiple layers of mesh text elements.
- Try to use only ‘normal’ quality. If you need high resolution mesh fonts, try to select just one font to be used with that style.
9) If your styles have been developed, assign all final styles to style presets. Write down, which typeface-style combinations have to be used in your project, because every single combination will create its own cached and loaded font.
10) Create a ‘Font-Style-Sheet-Scene’ where all allowed combinations are displayed on screen with dummy texts. You also could assist your team with such a scene with creating Repository Elements for each combination: call them Headline, Normal, Bold, etc
11) Close Ventuz and delete the Font Cache. (see above)
12) Launch Ventuz and open your project again. Load you font-style-sheet and let Ventuz re-generate all typeface/style combinations.
13) Check the resource values in the Scene Statistics dialog where you can see the actual memory occupied by your fonts. There shouldn’t be any other fonts as you have configured in you presets and style-sheet scene.
14) Start creating the actual scenes by only accessing the allowed combination (Repository items)
In general we can say that a 12,000 glyph high-quality mesh font (no extrusion) needs about 40MB of memory. The same high quality texture font would need about 400MB!
If you follow these guides and always handle such large fonts carefully, you can be sure to create a complete function Chinese, Japanese or Korean Ventuz show!
Have fun!
Ralf