I - UTF-8 strings in FLTK-UTF8

This chapter covers the UTF-8 functions that are provided with FLTK-UTF8.

FLTK UTF-8 Functions

All standards widgets and functions have been modified to handle UTF-8 encoded text. No other encoding is supported, it means that you must convert all non UTF-8 text to UTF-8.

FLTK-UTF8 provides the following types of specific UTF-8 functions:

Text drawing

There is two functions to draw text. One for LEFT-TO-RIGHT text direction and the other for RIGHT-TO-LEFT.

void fl_draw(const char* c, int n, int x, int y)

Draws the n first characters of the c UTF-8 encoded string. The left side of the first glyph starts at the x pixel location. The left side of the second character starts at x + fl_width(c[0]). y is the location of glyphs base line.

void fl_rtl_draw(const char* c, int n, int x, int y)

Draws the n first characters of the c UTF-8 encoded string. The right side of the first glyph starts at the x pixel location. The right side of the second character starts at x - fl_width(c[0]). pixel location. y is the location of glyphs base line.