summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorFelipe CorrĂȘa da Silva Sanches <juca@members.fsf.org>2018-03-25 20:37:55 +0000
committerFelipe CorrĂȘa da Silva Sanches <juca@members.fsf.org>2018-03-27 18:06:19 +0000
commite5c572ec63e9d529c2ab44084c54f58fb1328c39 (patch)
tree39504992dc0eb0102ecc56baa95164c9969da87d /src/libnrtype
parentAdd the path 'd' property to the blacklist for default style. (diff)
downloadinkscape-e5c572ec63e9d529c2ab44084c54f58fb1328c39.tar.gz
inkscape-e5c572ec63e9d529c2ab44084c54f58fb1328c39.zip
move FTFixedToDouble / FTDoubleToFixed to a common header
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/OpenTypeUtil.cpp8
-rw-r--r--src/libnrtype/OpenTypeUtil.h7
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,