HarfBuzz::Font::FreeType

binds to the HarfBuzz font shaping library

[Raku HarfBuzz Project] / [HarfBuzz-Font-FreeType Module]

class HarfBuzz::Font::FreeType

A HarfBuzz FreeType face integrated font

has Font::FreeType::Face:D $.ft-face

HarfBuzz FreeType bound font data-type

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.

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.

method ft-load-flags

method ft-load-flags() returns Int

Get or set the FreeType load flags

HarfBuzz::Font::FreeType v0.0.8

binds to the HarfBuzz font shaping library

Authors

  • David Warring

License

Artistic-2.0

Dependencies

HarfBuzz:ver<0.0.8+>Font::FreeType

Test Dependencies

Provides

  • HarfBuzz::Font::FreeType
  • HarfBuzz::Font::FreeType::Raw

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.