FreeType
Synopsis
use HarfBuzz::Font::FreeType;
use HarfBuzz::Shaper;
use Font::FreeType::Face;
my Font::FreeType::Face $ft-face .= new: ...;
my HarfBuzz::Font::FreeType() .= %( :$ft-face, :@features, :$size, :@scale );
my HarfBuzz::Shaper $shaper .= new: :$font, :buf{ :text<Hello> };
Description
This modules supports FreeType integration for the HarfBuzz library.
It may be used to do HarfBuzz shaping from a Font::FreeType object.
Note that HarfBuzz can load OpenType and TrueType format fonts directly. The FreeType integration most likely to be useful for other font formats, that can be loaded by [Font::FreeType](https://harfbuzz-raku.github.io/Font-FreeType-raku/).
Methods
This class inherits from HarfBuzz::Font and has all its methods available.
new
use Font::FreeType::Face;
use HarfBuzz::Font::FreeType;
method new(
Font::FreeType::Face:D :$ft-face!, # FreeeType face
Bool :$funcs = True, # use FreeType functions
Num() :$size = 12e0, # font size (points)
:@scale, # font scale [x, y?]
) returns HarfBuzz::Font::FreeType:D
Creates a new FreeType integrated font.
multi method COERCE(
% (Font::FreeType::Face:D :$ft-face!, |etc)
) returns HarfBuzz::Font::FreeType:D
Coerces a FreeType integrated font, from an options hash.