Skip to content

arielm/Unicode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Unicode test suite for Cinder & C++11

Post mortem: this project is no longer maintained.

The outcome has been integrated in the new-chronotext-toolkit, under the ZFont (aka VirtualFont) denomination.

The 15 examples below still worth being visited. They provide valuable insights and allow to grasp the complexity and subtlety of international text rendering.


The goal is to provide building blocks for handling Unicode text rendering from the ground-up on OSX, iOS and Android (Windows support should be trivial to add, contributions are welcome...)

Topics of interest

  1. Glyph shaping
  2. Font fallback
  3. Layout caching
  4. Script itemization
  5. BIDI reordering
  6. Line breaking
  7. OpenGL rendering

Freetype should be used behind the scenes. In addition, existing quality open-source fonts should be evaluated, starting with those bundled with the Android platform.

Motivations and scope

The goal is to provide support for internationalization in interactive applications and games created with Cinder. Currently, there is no appropriate cross-platform solution due the lack of public C++ API for text-rendering on Android.

Take in count, however, that not all the features available in OS solutions like CoreText (or even in modern browsers) are going to be implemented.

Progress

So far, Harfbuzz and ICU have been tested successfully via the following projects:

  1. CinderHarfbuzz
  2. ShapingTester
  3. ShapingMetrics
  4. FontComparator
  5. LanguageFeatures
  6. ShapingFallback
  7. SimpleBIDI
  8. SimpleVirtualFont
  9. SimpleLayoutCaching
  10. SimpleRendering
  11. ScriptDetector
  12. BIDI
  13. LayoutCaching
  14. VirtualFont
  15. Rendering

More work remains, notably with line-breaking and OpenGL rendering...

Installation

The instructions are for OSX.

  1. Download Cinder 0.8.5 Vanilla
  2. Unzip and rename the "cinder_0.8.5_mac" folder to "Cinder"
  3. Place a copy of the Freetype repository in Cinder/blocks
  4. Place a copy of this repository in Cinder/samples

The folder hierarchy should look like:
Cinder
|--blocks
|..|--Freetype
|--samples
|..|--Unicode

Running on OSX and iOS

  1. Enter the relevant folder in Projects
  2. Open the relevant XCode project (under osx or ios)

Tested with OSX 10.7.5 and XCode 4.6.2.
Tested with OSX 10.8.5 and XCode 5.0.2.

Running on Android

Prerequisites:

  1. Safetydank's fork of Cinder
  2. NDK r8e
  3. ADT 22.0.5

Then:

  1. Enter the relevant folder in Projects
  2. Enter the android folder
  3. Type . ./setup-android in Terminal and follow the instructions