Help language development. Donate to The Perl Foundation
[Raku HarfBuzz Project] / [HarfBuzz-Font-FreeType Module]
A HarfBuzz FreeType face integrated font
HarfBuzz FreeType bound font data-type
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> };
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.
This class inherits from HarfBuzz::Font and has all its methods available.
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.
method ft-load-flags() returns Int
Get or set the FreeType load flags