View on GitHub

Font-FreeType-raku

Read font files and render glyphs using FreeType2

[Raku PDF Project] / [Font-FreeType Module] / Font::FreeType :: CharMap

class Font::FreeType::CharMap

Character map from font typefaces

Synopsis

use Font::FreeType;

my Font::FreeType $freetype .= new;
my $face = $freetype.face('Vera.ttf');
my $charmap = $face.charmap;
say $charmap.platform-id;
say $charmap.encoding-id;
say $charmap.encoding;

Description

A charmap is used to translate character codes in a given encoding into glyph indexes for its parent’s face. Some font formats may provide several charmaps per font.

Constants

The following encoding constants are exported by default by Font::FreeType. See freetype documentation

Methods

platform-id

An ID number describing the platform for the following encoding ID. This comes directly from the TrueType specification and should be emulated for other formats.

For details please refer to the TrueType or OpenType specification.

encoding-id

A platform specific encoding number. This also comes from the TrueType specification and should be emulated similarly.

For details please refer to the TrueType or OpenType specification.

encoding

A FreeType Encoding tag (constant) identifying the charmap.

Copyright 2004, Geoff Richards.

Ported from Perl to Raku by David Warring david.warring@gmail.com Copyright 2017.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.