Module pyglet.font.base

Abstract classes used by pyglet.font implementations.

These classes should not be constructed directly. Instead, use the functions in pyglet.font to obtain platform-specific instances. You can use these classes as a documented interface to the concrete classes.

Classes

  Glyph
A single glyph located within a larger texture.
  GlyphTextureAtlas
A texture within which glyphs can be drawn.
  GlyphRenderer
Abstract class for creating glyph images.
  FontException
Generic exception related to errors from the font module.
  Font
Abstract font class able to produce glyphs.

Functions

List of unicode get_grapheme_clusters(text)
Implements Table 2 of UAX #29: Grapheme Cluster Boundaries.

Function Details

get_grapheme_clusters

get_grapheme_clusters(text)

Implements Table 2 of UAX #29: Grapheme Cluster Boundaries.

Does not currently implement Hangul syllable rules.

Parameters:
text : unicode
String to cluster.
Returns:
List of unicode: List of Unicode grapheme clusters

Since: pyglet 1.1.2