summaryrefslogtreecommitdiff
path: root/src/mbgl/text/font_stack.cpp
diff options
context:
space:
mode:
authorMike Morris <mikemorris@users.noreply.github.com>2016-04-13 18:42:49 -0700
committerMike Morris <mikemorris@users.noreply.github.com>2016-04-13 18:42:49 -0700
commite39482d5570719654e7206d74a2c7bee1aa96dae (patch)
tree0882fca33ce21b0f5db11a751c788618ed72d912 /src/mbgl/text/font_stack.cpp
parentfea3aa573ad49003068f94374d766300fc35247f (diff)
downloadqtlocation-mapboxgl-upstream/harfbuzz.tar.gz
wire in some freetype nonsenseupstream/harfbuzz
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;