summaryrefslogtreecommitdiff
path: root/src/mbgl/text
Commit message (Collapse)AuthorAgeFilesLines
...
* Small line breaking improvements based on testing with Chinese data:Chris Loer2017-01-051-21/+23
| | | | | | | - Put "breakable" punctuation (such as a hyphen) on the line that starts the break, not the line after the break. - Process all characters with the line breaking algorithm, even if we don't have glyphs for them. Some fonts have glyph-less breakable characters (we end up treating them similarly to a "zero-width space"). - Don't include trailing white space in raggedness calculations - Make the "favor short final lines" rule more aggressive (unlike the other changes, this one is purely an aesthetic choice)
* Port raggedness-minimizing line breaking from gl-js.Chris Loer2017-01-053-46/+108
|
* Render newlines in labels even if there's nothing else on the line.Chris Loer2017-01-051-10/+10
|
* Cleaning up line breaking code.Chris Loer2017-01-052-34/+27
| | | | | | * Don't include trailing spacing (as opposed to whitespace) in lineLength * Modify BiDi interface to require initial bidi layout and linebreaking to happen in one call. * Code style changes suggested by @kkaefer
* [core] Fix symbol rendering for multipointsJohn Firebaugh2016-12-201-0/+1
| | | | Ports https://github.com/mapbox/mapbox-gl-js/pull/3763 and https://github.com/mapbox/mapbox-gl-js/pull/3806.
* [core] Added BidiImpl to avoid ICU types exposureBruno de Oliveira Abinader2016-12-121-4/+3
|
* [build] ICU is now configured per platformBruno de Oliveira Abinader2016-12-121-125/+0
|
* [core] Full support for line breaking bidirectional text using ICU bidi ↵Chris Loer2016-11-304-144/+306
| | | | | | | functionality. - Trim whitespace from labels before determining their max-width for alignment. - Fix crash on labels that contain lines with only a single character of whitespace.
* [build] move logging to utilKonstantin Käfer2016-11-222-3/+3
|
* [core] Convert style properties to a tuple-based approachJohn Firebaugh2016-11-174-29/+25
| | | | | | | | This converts the style property classes (CirclePaintProperties and so on) to the same tuple-based approach as gl::Attribute and gl::Uniform. The approach is outlined in https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md. The main advantage of this approach is it allows writing algorithms that work on sets of style properties, without resorting to code generation or manually repetitive code. This lets us iterate on approaches to data-driven properties more easily. Another advantage is that the cascading, unevaluated, and evaluated states of a set of properties exist as independent structures, instead of individual properties holding their own state. This is a more functional approach that makes data flow clearer and reduces state.
* [core] Add minimal line breaking support for RTL text.Chris Loer2016-11-174-12/+22
|
* [core] Add ICU package for Bidirectional text support and arabic text shaping.Chris Loer2016-11-172-0/+75
| | | | | Apply bidi and shaping in symbol_layout. Add utility functions for converting to and from UTF-16.
* [core] Use UTF-16 instead of UTF-32 for label features to avoid extra ↵Chris Loer2016-11-176-10/+10
| | | | | | | conversions and reduce in-memory size. Continue to use uint32 as glyph ID to maintain Glyph PBF, even though we're only using 16 bits of that uint32. Use std::codecvt instead of boost::unicode_iterator for UTF8->UTF16 conversions.
* [core] Line-break ideographic text by character (#6828)Minh Nguyễn2016-11-142-18/+20
| | | | | | | | | | | | | | * [core] Line-break ideographic text by character Allow a line break to be inserted after any supported Chinese, Japanese, or Yi character in a point-placed label. Balance the lines unless non-ideographic text such as Latin letters are present. Fixes #1223. * [core] Moved more character classing into util::i18n * [core] Detect character properties by Unicode block * [test] Reenabled ideographic breaking tests
* [core] convert GlyphAtlas to use managed texture handlingKonstantin Käfer2016-11-012-66/+29
|
* [core] Moved util::log2 to its own headerBruno de Oliveira Abinader2016-10-311-0/+1
| | | | | | - Added util::{MIN,MAX}_ZOOM_F to avoid consecutive conversions from double to float - Move util::log2 to its own header (part of mbgl/math)
* [core] Modern C++ bindings for OpenGLJohn Firebaugh2016-10-281-1/+1
|
* [core] operator bool() must always be explicitJohn Firebaugh2016-10-282-4/+12
| | | | Otherwise, it can participate in unexpected conversions. Case in point: GlyphSet::insert was comparing the result of GlyphMetrics::operator bool() where it wanted to use operator==.
* [core] Reuse last placement data in CollisionTile::queryRenderedFeaturesBruno de Oliveira Abinader2016-10-251-32/+68
| | | | | | | | | | | To obtain precise results, we: 1. Round scale value to obtain same results from symbol shader. 2. Generate a boost geometry polygon to check if it intersects() against all feature boxes. 3. Check if current scale is within each feature's minimum and maximum placement scales. 4. De-scale feature boxes when intersecting to account for the fractional zoom scaling.
* [core] Simplify CollisionTile::findPlacementScaleBruno de Oliveira Abinader2016-10-252-8/+6
| | | | | | Improve findPlacementScale semantics by moving the check if the placement scale result is bigger than minimum scale out of the function scope.
* [core] Avoid duplicating edges for CollisionTileBruno de Oliveira Abinader2016-10-252-23/+16
| | | | | Make 'edges' static to avoid every instance of CollisionTile having its own copy of it.
* [core] Cleanup function signatures in CollisionTileBruno de Oliveira Abinader2016-10-252-7/+7
| | | | | - Prefer pass-by-value for primitive types. - Use floating point precision for yStretch to match receiving type.
* [core] Cleanup SymbolLayoutBruno de Oliveira Abinader2016-10-132-8/+10
| | | | | Reuse reverse rotation matrix from CollisionTile when populating the collision boxes.
* [core] Use query geometry from FeatureIndex into ↵Bruno de Oliveira Abinader2016-10-112-3/+15
| | | | CollisionTile::queryRenderedSymbols
* [core] Skip placement scale for features that ignore placementBruno de Oliveira Abinader2016-10-111-7/+13
|
* [core] remove dependence on gl.h typesKonstantin Käfer2016-09-292-8/+7
|
* [core] merge gl::ObjectStore into gl::ContextKonstantin Käfer2016-09-272-8/+7
|
* [core] rename gl::Config to gl::ContextKonstantin Käfer2016-09-272-13/+13
|
* [core] Extract some GlyphRange-related constantsJohn Firebaugh2016-09-261-0/+3
|
* [core] Convert uses of std::set to std::unordered_set (#6325)Lucas Wojciechowski2016-09-194-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/mbgl/annotation/annotation_manager.hpp * src/mbgl/algorithm/update_renderables.hpp * src/mbgl/geometry/glyph_atlas.hpp * src/mbgl/renderer/painter.cpp and src/mbgl/renderer/render_item.hpp * src/mbgl/renderer/symbol_bucket.hpp and src/mbgl/text/glyph_store.hpp * src/mbgl/sprite/sprite_atlas.hpp * include/mbgl/storage/network_status.hpp * src/mbgl/text/collision_tile.cpp * src/mbgl/style/update_batch.hpp * platform/default/mbgl/storage/offline_download.hpp * Add GlyphRangeSet typedef * Fix whitespace & unused imports
* [core] Merge GlyphStore and GlyphAtlasJohn Firebaugh2016-09-197-155/+386
|
* [core] change bool *AlongLine to SymbolPlacementTypeKonstantin Käfer2016-09-074-13/+14
|
* [core] Revert workaround for std::atomic on ARMv5Thiago Marcos P. Santos2016-07-131-2/+2
| | | | | | Got fix on r12. https://github.com/android-ndk/ndk/issues/31
* [core] Avoid unnecessary copies in GlyphSet::insertJohn Firebaugh2016-07-043-5/+5
|
* [core] code style cleanupsKonstantin Käfer2016-07-011-5/+5
| | | | | | | - puts function definitions in a namespace ... {} rather than using namespace ...; - remove trailing whitespace - add trailing newline - protect SQL statements from being formatted by clang-format
* [core] Avoid redundant 'inline' usageBruno de Oliveira Abinader2016-06-184-12/+12
|
* Support for icon-text-fit, icon-text-fit-padding (#5334)Young Hahn2016-06-152-7/+39
| | | | | | | | | | * Add support for icon-text-fit * Port unit tests for getIconQuads() from js => cpp * Add support for padding in all 4 directions. * Update all hashes post-merge
* [tidy] Check modernize-pass-by-valueBruno de Oliveira Abinader2016-06-136-21/+19
| | | | Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
* [tidy] Check llvm-namespace-commentBruno de Oliveira Abinader2016-06-132-2/+2
| | | | Ref: http://clang.llvm.org/extra/clang-tidy/checks/llvm-namespace-comment.html
* [core] *Tile ↔ *TileDataJohn Firebaugh2016-06-135-5/+5
| | | | Tile is now the main base class; RasterTile, VectorTile, etc are its subclasses. GeometryTileData and its subclasses form the piece that's passed to the worker.
* Don't apply textRotate twice. (#5321)Young Hahn2016-06-111-2/+2
|
* text-pitch-alignment (#5288)Young Hahn2016-06-102-12/+11
| | | | | | | | | | | | * First pass at port of https://github.com/mapbox/mapbox-gl-js/pull/2668 * RotationAlignmentType => AlignmentType * Handle undefined default value for text-pitch-alignment and implement inheritance for this value from text-rotation-alignment * Update dependencies * Move handling fo undefined default value out of camelize functions
* Merge branch 'release-android-v4.1.0'Brad Leege2016-06-091-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/BaseMarkerViewOptions.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerView.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/annotations/MarkerViewManager.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapView.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java # platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/NativeMapView.java # platform/android/src/jni.cpp # src/mbgl/geometry/buffer.hpp # src/mbgl/geometry/glyph_atlas.cpp # src/mbgl/geometry/glyph_atlas.hpp # src/mbgl/geometry/line_atlas.cpp # src/mbgl/geometry/vao.cpp # src/mbgl/gl/gl_object_store.cpp # src/mbgl/gl/gl_object_store.hpp # src/mbgl/renderer/frame_history.cpp # src/mbgl/shader/shader.cpp # src/mbgl/sprite/sprite_atlas.cpp # src/mbgl/sprite/sprite_atlas.hpp # src/mbgl/text/glyph_pbf.hpp
| * [android] #5254 - fix ARMv5 supportThiago Marcos P. Santos2016-06-061-2/+2
| | | | | | | | Backported patches fixing ARMv5 support for issue #3985.
* | [core] Rationalize naming for style-related codeJohn Firebaugh2016-06-027-56/+65
| |
* | [core] Runtime style layer APIJohn Firebaugh2016-06-022-2/+2
|/
* [core] use #pragma once instead of ifdef include guardsKonstantin Käfer2016-05-2513-52/+13
|
* [core] move *Observers to their own filesKonstantin Käfer2016-05-235-17/+33
|
* [core] move RenderItem and GlyphRange to their own headersKonstantin Käfer2016-05-232-3/+14
|
* [core] Use mapbox::geometry::{box,envelope}John Firebaugh2016-05-132-4/+4
|