/*
5 * Authors: see git history
7 * Copyright (C) 2022 Authors
8 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
10#ifndef LIBNRTYPE_FONT_INSTANCE_H
11#define LIBNRTYPE_FONT_INSTANCE_H
15#include <unordered_map>
16#include <unordered_set>
19#include <cairo/cairo.h>
20#include <pango/pango-types.h>
21#include <pango/pango-font.h>
51 template <
typename... Args>
87 double Advance(
unsigned int glyph_id,
bool vertical);
102 bool FontMetrics(
double &ascent,
double &descent,
double &leading)
const;
104 bool FontDecoration(
double &underline_position,
double &underline_thickness,
105 double &linethrough_position,
double &linethrough_thickness)
const;
107 bool FontSlope(
double &run,
double &rise)
const;
194 std::unordered_map<unsigned int, std::unique_ptr<FontGlyph const>>
glyphs;
_PangoFontDescription PangoFontDescription
TODO: insert short description here.
struct _PangoFont PangoFont
FontInstance provides metrics, OpenType data, and glyph curves/pixbufs for a font.
Glib::ustring GetFilename() const
Attempt to get the ttf filename for this font instance.
Geom::PathVector const * PathVector(unsigned int glyph_id)
std::map< Glib::ustring, OTSubstitution > const & get_opentype_tables()
double _baselines[SP_CSS_BASELINE_SIZE]
PangoFontDescription * descr
std::shared_ptr< Data > data
Geom::Rect BBoxPick(unsigned int glyph_id)
double GetXHeight() const
unsigned short _family_class
bool IsOutlineFont() const
int GetDesignUnits() const
bool has_vertical() const
Geom::Rect BBoxDraw(unsigned int glyph_id)
bool FontSlope(double &run, double &rise) const
Geom::Rect BBoxExact(unsigned int glyph_id)
std::shared_ptr< void const > share_data() const
auto const & get_opentype_varaxes() const
double GetTypoDescent() const
std::unordered_set< std::string > openTypeTableList
unsigned int MapUnicodeChar(gunichar c) const
double GetMaxAscent() const
bool FontDecoration(double &underline_position, double &underline_thickness, double &linethrough_position, double &linethrough_thickness) const
FontGlyph const * LoadGlyph(unsigned int glyph_id)
const double * GetBaselines() const
Inkscape::Pixbuf const * PixBuf(unsigned int glyph_id)
double Advance(unsigned int glyph_id, bool vertical)
bool is_fixed_width() const
unsigned short family_class() const
bool FontMetrics(double &ascent, double &descent, double &leading) const
double GetMaxDescent() const
void acquire(PangoFont *p_font, PangoFontDescription *descr)
double GetTypoAscent() const
Axis aligned, non-empty rectangle.
Class to hold image data for raster images.
Struct describing a single glyph in a font.
Helper class to stream background task notifications as a series of messages.
PathVector - a sequence of subpaths.
Exception thrown if construction fails.
CtorException(Args &&... args)
std::unordered_map< unsigned int, std::unique_ptr< FontGlyph const > > glyphs
std::map< Glib::ustring, OTVarAxis > openTypeVarAxes
std::map< int, std::string > openTypeSVGData
std::optional< std::map< Glib::ustring, OTSubstitution > > openTypeTables
std::map< unsigned int, SVGGlyphEntry > openTypeSVGGlyphs
SPStyle enums: named public enums that correspond to SVG property values.