diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-10-29 19:19:31 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-01-28 09:03:03 -0500 |
commit | 5fd63d21e97e512b81b678b01ae3a8b6245d783c (patch) | |
tree | 48af0296f9c6c55b30458b09b29ff9998eb0c7b5 /pango/pango-hbfont.h | |
parent | 25dead66ee992a529660f30b5fa692da345b7991 (diff) | |
download | pango-5fd63d21e97e512b81b678b01ae3a8b6245d783c.tar.gz |
Add PangoHbFont
This is a simple wrapper around hb_font_t.
This is an attempt to make a font backend that does
not depend on platform specifics and can be used in
tests.
Diffstat (limited to 'pango/pango-hbfont.h')
-rw-r--r-- | pango/pango-hbfont.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pango/pango-hbfont.h b/pango/pango-hbfont.h new file mode 100644 index 00000000..1c747d97 --- /dev/null +++ b/pango/pango-hbfont.h @@ -0,0 +1,50 @@ +/* Pango + * + * Copyright (C) 2021 Matthias Clasen + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#pragma once + +#include <pango/pango-types.h> +#include <pango/pango-hbface.h> +#include <hb.h> + +G_BEGIN_DECLS + +#define PANGO_TYPE_HB_FONT (pango_hb_font_get_type ()) + +PANGO_AVAILABLE_IN_1_52 +G_DECLARE_FINAL_TYPE (PangoHbFont, pango_hb_font, PANGO, HB_FONT, PangoFont) + +PANGO_AVAILABLE_IN_1_52 +PangoHbFont * pango_hb_font_new (PangoHbFace *face, + int size, + hb_feature_t *features, + unsigned int n_features, + hb_variation_t *variations, + unsigned int n_variations, + PangoGravity gravity, + float dpi, + const PangoMatrix *matrix); + +PANGO_AVAILABLE_IN_1_52 +PangoHbFont * pango_hb_font_new_for_description (PangoHbFace *face, + const PangoFontDescription *description, + float dpi, + const PangoMatrix *matrix); +G_END_DECLS |