diff options
| author | Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org> | 2018-03-25 20:37:55 +0000 |
|---|---|---|
| committer | Felipe CorrĂȘa da Silva Sanches <juca@members.fsf.org> | 2018-03-27 18:06:19 +0000 |
| commit | e5c572ec63e9d529c2ab44084c54f58fb1328c39 (patch) | |
| tree | 39504992dc0eb0102ecc56baa95164c9969da87d /src/libnrtype | |
| parent | Add the path 'd' property to the blacklist for default style. (diff) | |
| download | inkscape-e5c572ec63e9d529c2ab44084c54f58fb1328c39.tar.gz inkscape-e5c572ec63e9d529c2ab44084c54f58fb1328c39.zip | |
move FTFixedToDouble / FTDoubleToFixed to a common header
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/OpenTypeUtil.cpp | 8 | ||||
| -rw-r--r-- | src/libnrtype/OpenTypeUtil.h | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/libnrtype/OpenTypeUtil.cpp b/src/libnrtype/OpenTypeUtil.cpp index 72541824b..ba6fe8ec7 100644 --- a/src/libnrtype/OpenTypeUtil.cpp +++ b/src/libnrtype/OpenTypeUtil.cpp @@ -38,14 +38,6 @@ Glib::ustring extract_tag( guint32 *tag ) { return tag_name; } -inline double FTFixedToDouble (FT_Fixed value) { - return static_cast<FT_Int32>(value) / 65536.0; -} - -inline FT_Fixed FTDoubleToFixed (double value) { - return static_cast<FT_Fixed>(value * 65536); -} - // Make a list of all tables fount in the GSUB // This list includes all tables regardless of script or language. diff --git a/src/libnrtype/OpenTypeUtil.h b/src/libnrtype/OpenTypeUtil.h index d76b53e06..5c0780492 100644 --- a/src/libnrtype/OpenTypeUtil.h +++ b/src/libnrtype/OpenTypeUtil.h @@ -40,6 +40,13 @@ class OTVarNamed { std::map<Glib::ustring, double> axes; }; +inline double FTFixedToDouble (FT_Fixed value) { + return static_cast<FT_Int32>(value) / 65536.0; +} + +inline FT_Fixed FTDoubleToFixed (double value) { + return static_cast<FT_Fixed>(value * 65536); +} void readOpenTypeGsubTable (const FT_Face ft_face, std::map<Glib::ustring, int>& tables, |
