diff options
author | Chris Loer <chris.loer@gmail.com> | 2017-11-27 12:50:28 -0800 |
---|---|---|
committer | Chris Loer <chris.loer@mapbox.com> | 2017-12-11 10:43:00 -0800 |
commit | cb380064bb768c1a20d2260ac4a032dbcd3184fe (patch) | |
tree | e833b8e057b63c93626f0aea4804f926156bb8cd /src/mbgl/text | |
parent | 1661af1cb409505bb362e2274cb61f097ad25864 (diff) | |
download | qtlocation-mapboxgl-cb380064bb768c1a20d2260ac4a032dbcd3184fe.tar.gz |
[ios,macos] Darwin implementation of a CoreText-based LocalGlyphRasterizer.
- Changing font weight does not currently appear to be working.
- Glyph metric extraction code not working; currently unused.
Diffstat (limited to 'src/mbgl/text')
-rw-r--r-- | src/mbgl/text/glyph_manager.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/text/local_glyph_rasterizer.hpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mbgl/text/glyph_manager.hpp b/src/mbgl/text/glyph_manager.hpp index 194f503ff1..84db2c4be5 100644 --- a/src/mbgl/text/glyph_manager.hpp +++ b/src/mbgl/text/glyph_manager.hpp @@ -25,7 +25,7 @@ public: class GlyphManager : public util::noncopyable { public: - GlyphManager(FileSource&, std::unique_ptr<LocalGlyphRasterizer> = std::make_unique<LocalGlyphRasterizer>()); + GlyphManager(FileSource&, std::unique_ptr<LocalGlyphRasterizer> = std::make_unique<LocalGlyphRasterizer>(optional<std::string>())); ~GlyphManager(); // Workers send a `getGlyphs` message to the main thread once they have determined diff --git a/src/mbgl/text/local_glyph_rasterizer.hpp b/src/mbgl/text/local_glyph_rasterizer.hpp index c2bdbd2840..82b16b534d 100644 --- a/src/mbgl/text/local_glyph_rasterizer.hpp +++ b/src/mbgl/text/local_glyph_rasterizer.hpp @@ -32,11 +32,15 @@ namespace mbgl { class LocalGlyphRasterizer { public: - virtual ~LocalGlyphRasterizer() = default; + virtual ~LocalGlyphRasterizer(); + LocalGlyphRasterizer(const optional<std::string> fontFamily = optional<std::string>()); // virtual so that test harness can override platform-specific behavior virtual bool canRasterizeGlyph(const FontStack&, GlyphID); virtual Glyph rasterizeGlyph(const FontStack&, GlyphID); +private: + class Impl; + std::unique_ptr<Impl> impl; }; } // namespace mbgl |