From aa85c54b2de903cacaf592efdac596ea3fce9fc3 Mon Sep 17 00:00:00 2001 From: Nicki Dlugash Date: Thu, 29 May 2014 15:42:04 -0400 Subject: [PATCH 1/6] dont have font stack yet with arial unicode bold as fallback to Open Sans Semibold, so changed them back --- bin/style.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/style.js b/bin/style.js index c831fd414..aa7d5b38f 100644 --- a/bin/style.js +++ b/bin/style.js @@ -649,7 +649,7 @@ module.exports = { "layer": "country_label", "text_field": "name", "path": "horizontal", - "font": "Open Sans Bold, Arial Unicode MS Bold", + "font": "Open Sans Semibold, Arial Unicode MS Bold", "fontSize": 24, "feature_type": "point", "type": "text" @@ -723,7 +723,7 @@ module.exports = { "value": "city", "text_field": "name", "path": "horizontal", - "font": "Open Sans Semibold, Arial Unicode MS Bold", + "font": "Open Sans Semibold, Arial Unicode MS Regular", "fontSize": 20, "feature_type": "point", "type": "text" @@ -735,7 +735,7 @@ module.exports = { "value": "town", "text_field": "name", "path": "horizontal", - "font": "Open Sans Semibold, Arial Unicode MS Bold", + "font": "Open Sans Semibold, Arial Unicode MS Regular", "fontSize": 24, "feature_type": "point", "type": "text" @@ -747,7 +747,7 @@ module.exports = { "value": "village", "text_field": "name", "path": "horizontal", - "font": "Open Sans Semibold, Arial Unicode MS Bold", + "font": "Open Sans Semibold, Arial Unicode MS Regular", "fontSize": 22, "feature_type": "point", "type": "text" @@ -763,7 +763,7 @@ module.exports = { ], "text_field": "name", "path": "horizontal", - "font": "Open Sans Semibold, Arial Unicode MS Bold", + "font": "Open Sans Semibold, Arial Unicode MS Regular", "fontSize": 18, "feature_type": "point", "type": "text" @@ -878,7 +878,7 @@ module.exports = { "text_field": "name", "path": "horizontal", "padding": 2, - "font": "Open Sans Semibold, Arial Unicode MS Bold", + "font": "Open Sans Semibold, Arial Unicode MS Regular", "fontSize": 11, "feature_type": "point", "type": "text" @@ -891,7 +891,7 @@ module.exports = { "text_field": "name", "path": "horizontal", "padding": 2, - "font": "Open Sans Semibold, Arial Unicode MS Bold", + "font": "Open Sans Semibold, Arial Unicode MS Regular", "fontSize": 10, "feature_type": "point", "type": "text" @@ -904,7 +904,7 @@ module.exports = { "text_field": "name", "path": "horizontal", "padding": 2, - "font": "Open Sans Semibold, Arial Unicode MS Bold", + "font": "Open Sans Semibold, Arial Unicode MS Regular", "fontSize": 10, "feature_type": "point", "type": "text" From 7b7e8007e3801de4593fa72f96fa2ac0c8ca43b6 Mon Sep 17 00:00:00 2001 From: Nicki Dlugash Date: Thu, 29 May 2014 15:44:38 -0400 Subject: [PATCH 2/6] temporarily changed country label font back to original --- bin/style.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/style.js b/bin/style.js index aa7d5b38f..8c7b11aaf 100644 --- a/bin/style.js +++ b/bin/style.js @@ -649,7 +649,7 @@ module.exports = { "layer": "country_label", "text_field": "name", "path": "horizontal", - "font": "Open Sans Semibold, Arial Unicode MS Bold", + "font": "Open Sans Bold, Arial Unicode MS Bold", "fontSize": 24, "feature_type": "point", "type": "text" From 3003085763d0b590d6f2c8536abed0e086839212 Mon Sep 17 00:00:00 2001 From: Nicki Dlugash Date: Thu, 29 May 2014 15:50:04 -0400 Subject: [PATCH 3/6] new font stack deployed. Made Arial Unicode Bold fallback for Open Sans Semibold --- bin/style.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/style.js b/bin/style.js index 8c7b11aaf..c831fd414 100644 --- a/bin/style.js +++ b/bin/style.js @@ -723,7 +723,7 @@ module.exports = { "value": "city", "text_field": "name", "path": "horizontal", - "font": "Open Sans Semibold, Arial Unicode MS Regular", + "font": "Open Sans Semibold, Arial Unicode MS Bold", "fontSize": 20, "feature_type": "point", "type": "text" @@ -735,7 +735,7 @@ module.exports = { "value": "town", "text_field": "name", "path": "horizontal", - "font": "Open Sans Semibold, Arial Unicode MS Regular", + "font": "Open Sans Semibold, Arial Unicode MS Bold", "fontSize": 24, "feature_type": "point", "type": "text" @@ -747,7 +747,7 @@ module.exports = { "value": "village", "text_field": "name", "path": "horizontal", - "font": "Open Sans Semibold, Arial Unicode MS Regular", + "font": "Open Sans Semibold, Arial Unicode MS Bold", "fontSize": 22, "feature_type": "point", "type": "text" @@ -763,7 +763,7 @@ module.exports = { ], "text_field": "name", "path": "horizontal", - "font": "Open Sans Semibold, Arial Unicode MS Regular", + "font": "Open Sans Semibold, Arial Unicode MS Bold", "fontSize": 18, "feature_type": "point", "type": "text" @@ -878,7 +878,7 @@ module.exports = { "text_field": "name", "path": "horizontal", "padding": 2, - "font": "Open Sans Semibold, Arial Unicode MS Regular", + "font": "Open Sans Semibold, Arial Unicode MS Bold", "fontSize": 11, "feature_type": "point", "type": "text" @@ -891,7 +891,7 @@ module.exports = { "text_field": "name", "path": "horizontal", "padding": 2, - "font": "Open Sans Semibold, Arial Unicode MS Regular", + "font": "Open Sans Semibold, Arial Unicode MS Bold", "fontSize": 10, "feature_type": "point", "type": "text" @@ -904,7 +904,7 @@ module.exports = { "text_field": "name", "path": "horizontal", "padding": 2, - "font": "Open Sans Semibold, Arial Unicode MS Regular", + "font": "Open Sans Semibold, Arial Unicode MS Bold", "fontSize": 10, "feature_type": "point", "type": "text" From 88f89d0150fb01a8f98b87ef2958940450fae14f Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 29 May 2014 13:09:10 -0700 Subject: [PATCH 4/6] initialize variables --- src/style/properties.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/style/properties.cpp b/src/style/properties.cpp index 0e4841830..b39f20c51 100644 --- a/src/style/properties.cpp +++ b/src/style/properties.cpp @@ -29,9 +29,11 @@ float functions::stops(float z, const std::vector& stops) { if (stops.size() % 2 != 0) return 0; bool smaller = false; - float smaller_z, smaller_val; + float smaller_z = 0.0; + float smaller_val = 0.0; bool larger = false; - float larger_z, larger_val; + float larger_z = 0.0; + float larger_val = 0.0; for (uint32_t i = 0; i < stops.size(); i += 2) { float stop_z = stops[i]; From b4d5b1ca657c92dc03a8b265b35637137ff1a50b Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 29 May 2014 13:09:24 -0700 Subject: [PATCH 5/6] use std::pow --- src/map/transform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/transform.cpp b/src/map/transform.cpp index 996117bfa..d567a586c 100644 --- a/src/map/transform.cpp +++ b/src/map/transform.cpp @@ -60,8 +60,8 @@ void Transform::_moveBy(const double dx, const double dy, const time duration) { // Un-rotate when rotated and panning far enough to show off-world in corners. double w = final.scale * util::tileSize / 2; - double m = std::sqrt(pow((current.width / 2), 2) + pow((current.height / 2), 2)); - double x = std::abs(sqrt(pow(final.x, 2) + pow(final.y, 2))); + double m = std::sqrt(std::pow((current.width / 2), 2) + pow((current.height / 2), 2)); + double x = std::abs(sqrt(std::pow(final.x, 2) + std::pow(final.y, 2))); if (current.angle && w - x < m) _setAngle(0, 500_milliseconds, true); if (duration == 0) { From 07767951ee8cf17620fd1a7eb86e1bba600c3ba0 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 29 May 2014 13:10:51 -0700 Subject: [PATCH 6/6] use std::abs --- src/clipper/clipper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clipper/clipper.cpp b/src/clipper/clipper.cpp index 95975450e..56ad58416 100755 --- a/src/clipper/clipper.cpp +++ b/src/clipper/clipper.cpp @@ -2152,13 +2152,13 @@ void Clipper::IntersectEdges(TEdge *e1, TEdge *e2, else if (e1->PolyTyp != e2->PolyTyp) { //toggle subj open path OutIdx on/off when Abs(clip.WndCnt) == 1 ... - if ((e1->WindDelta == 0) && abs(e2->WindCnt) == 1 && + if ((e1->WindDelta == 0) && std::abs(e2->WindCnt) == 1 && (m_ClipType != ctUnion || e2->WindCnt2 == 0)) { AddOutPt(e1, Pt); if (e1Contributing) e1->OutIdx = Unassigned; } - else if ((e2->WindDelta == 0) && (abs(e1->WindCnt) == 1) && + else if ((e2->WindDelta == 0) && (std::abs(e1->WindCnt) == 1) && (m_ClipType != ctUnion || e1->WindCnt2 == 0)) { AddOutPt(e2, Pt);