chanon / icu4unity

icu4c library wrapper for Unity game engine, focused on line breaking or word wrapping for Asian languages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

icu4unity

ICU4C library wrapper for the Unity game engine. Focused on word/line breaking for Asian languages.

What is it?

It allows to use ICU4C's line breaking facilities to do word/line breaking for Asian languages in Unity.

ICU4C is the same library used in many widely used software applications for line breaking such as Google Chrome.

You can now bring that same line breaking ability to your Unity game with icu4unity, simplifying localization and display of Asian language text.

Languages Supported

  • Chinese
  • Japanese
  • Thai
  • All other languages except Kmer, Laos and Burmese

Kmer, Laos and Burmese can be added by rebuilding the ICU data files to include their dictionaries.

Platforms Supported

Tested on:

  • Windows 64 bit
  • Android
  • macOS
  • iOS

Size Requirements

Data file size

To use ICU4C, its data file, icudt63l.dat, must be included in the final app in StreamingAssets.

The size is around 4.4MB and compresses to 2.4MB

Additionally for Android the whole file must be loaded into memory, using 4MB of memory.

A workaround for Android so it doesn't require 4MB of memory would be to copy the data file out of the jar file into SD card. Then the path could be given to ICU4C. However I haven't implemented this yet.

Code size

  • For Windows the dll file is about 1MB
  • For macOS the bundle size is about 1.5MB
  • For Android the .so files are about 1.7MB
  • For iOS the .a file is about 8MB, actual contribution to final executable size is less than 1.5MB

Todo

  • Document how to use
  • Create example project

License

Author: Chanon Sajjamanochai See LICENSE.md

About

icu4c library wrapper for Unity game engine, focused on line breaking or word wrapping for Asian languages

License:Other


Languages

Language:C++ 71.3%Language:C 23.9%Language:Objective-C 1.7%Language:Makefile 1.3%Language:Perl 0.5%Language:HTML 0.4%Language:M4 0.2%Language:Roff 0.2%Language:Shell 0.2%Language:CMake 0.1%Language:Python 0.1%Language:Batchfile 0.0%Language:C# 0.0%Language:CSS 0.0%Language:sed 0.0%Language:PowerShell 0.0%Language:XSLT 0.0%Language:Emacs Lisp 0.0%