summaryrefslogtreecommitdiff
path: root/src/mbgl/text/font_stack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/text/font_stack.cpp')
-rw-r--r--src/mbgl/text/font_stack.cpp26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/mbgl/text/font_stack.cpp b/src/mbgl/text/font_stack.cpp
index 4c27a3dc5f..05274be315 100644
--- a/src/mbgl/text/font_stack.cpp
+++ b/src/mbgl/text/font_stack.cpp
@@ -35,31 +35,9 @@ const Shaping FontStack::getShaping(const std::u32string &string, const float ma
const float lineHeight, const float horizontalAlign,
const float verticalAlign, const float justify,
const float spacing, const vec2<float> &translate) const {
- /*
- Shaping shaping(translate.x * 24, translate.y * 24, string);
-
- // TODO: the y offset *should* be part of the font metadata
- const int32_t yOffset = -17;
-
- float x = 0;
- const float y = yOffset;
- */
-
// Create new Harfbuzz font object
- Font font("/Library/Fonts/Arial Unicode.ttf");
- Shaping shaping = font.shape(string, spacing, translate);
-
- /*
- // Loop through all characters of this label and shape.
- for (uint32_t chr : string) {
- auto it = sdfs.find(chr);
- if (it != sdfs.end()) {
- // TODO: change this instead of assuming they stay in order
- shaping.positionedGlyphs.emplace_back(chr, x, y);
- x += it->second.metrics.advance + spacing;
- }
- }
- */
+ Font font("/Users/mikemorris/Desktop/Open_Sans/OpenSans-Regular.ttf");
+ Shaping shaping = font.shape(string, spacing, translate, sdfs);
if (shaping.positionedGlyphs.empty())
return shaping;