summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2019-09-20 07:47:46 +0000
committerTavmjong Bah <tavmjong@free.fr>2019-09-20 07:47:46 +0000
commitb88b59b4c7fc5b4b11a393c9d0353a0b8d6e35e3 (patch)
tree61b8b8c2b58852d2bd2128be3ed8ec7505200ac9 /src/libnrtype
parentHandle SVG in OpenType fonts with compressed glyphs. (diff)
downloadinkscape-b88b59b4c7fc5b4b11a393c9d0353a0b8d6e35e3.tar.gz
inkscape-b88b59b4c7fc5b4b11a393c9d0353a0b8d6e35e3.zip
Handle SVG in OpenType fonts where glyphs have floating point numbers in 'viewBox'.
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/FontInstance.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnrtype/FontInstance.cpp b/src/libnrtype/FontInstance.cpp
index 5a3d5aa9f..b58d54788 100644
--- a/src/libnrtype/FontInstance.cpp
+++ b/src/libnrtype/FontInstance.cpp
@@ -699,7 +699,7 @@ Inkscape::Pixbuf* font_instance::PixBuf(int glyph_id)
Glib::ustring svg = glyph_iter->second.svg;
Glib::RefPtr<Glib::Regex> regex =
- Glib::Regex::create("viewBox=\"\\s*(\\d*)\\s*,?\\s*(\\d*)\\s*,?\\s*(\\d*)\\s*,?\\s*(\\d*)\\s*\"");
+ Glib::Regex::create("viewBox=\"\\s*(\\d*\\.?\\d+)\\s*,?\\s*(\\d*\\.?\\d+)\\s*,?\\s*(\\d+\\.?\\d+)\\s*,?\\s*(\\d+\\.?\\d+)\\s*\"");
Glib::MatchInfo matchInfo;
regex->match(svg, matchInfo);
if (matchInfo.matches()) {