diff --git a/CHANGELOG.md b/CHANGELOG.md index c32db23..059c7a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ * :warning: Add _integer_ field type ([#217], thanks [@k-yle]) * :warning: Store `terms` and `aliases` as an array in the translation files ([#227], thanks [@k-yle]) * :warning: Support discarding tags, not just keys ([#231], thanks [@k-yle]) +* :warning: Pinhead icon set is allowed as an additional source for icons ([#300], thanks [@matkoniecz]) ###### Non-breaking changes, which affect consumers diff --git a/ICONS.md b/ICONS.md index 5f05ced..e39e069 100644 --- a/ICONS.md +++ b/ICONS.md @@ -14,6 +14,7 @@ Icons from the below listed sources can be used. When specifying an icon, use th | [Font Awesome Solid](https://fontawesome.com/search?o=r&ic=free&s=solid) | `fas-` | Solid style icons from Font Awesome (free tier) | [Preview](https://icones.js.org/collection/fa7-solid) | | [Font Awesome Regular](https://fontawesome.com/search?o=r&ic=free&s=regular) | `far-` | Regular style icons from Font Awesome (free tier) | [Preview](https://icones.js.org/collection/fa7-regular) | | [Font Awesome Brands](https://fontawesome.com/search?o=r&ic=free&ip=brands) | `fab-` | Brand icons from Font Awesome (free tier) | [Preview](https://icones.js.org/collection/fa7-brands) | +| [Pinhead](https://pinhead.ink/) | `pinhead-` | Public domain icons for map pins | [Preview](https://pinhead.ink/) | | [iD Presets](https://github.com/openstreetmap/iD/tree/develop/svg/iD-sprite/presets) | `iD-` | iD's presets-icons | - | | [iD Fields](https://github.com/openstreetmap/iD/tree/develop/svg/iD-sprite/fields) | `iD-` | iD's fields-icons | - | diff --git a/MIGRATION_GUIDE.md b/MIGRATION_GUIDE.md index 441fc30..af80bdb 100644 --- a/MIGRATION_GUIDE.md +++ b/MIGRATION_GUIDE.md @@ -1,6 +1,6 @@ # v7 Migration Guide -v7 of [id-tagging-schema](https://github.com/openstreetmap/id-tagging-schema) and [schema-builder](https://github.com/ideditor/schema-builder) contains 5 breaking changes, where data consumers will need to take action. +v7 of [id-tagging-schema](https://github.com/openstreetmap/id-tagging-schema) and [schema-builder](https://github.com/ideditor/schema-builder) contains 6 breaking changes, where data consumers will need to take action. This document is a brief migration guide. The full list of changes is in [CHANGELOG.md](./CHANGELOG.md). @@ -117,7 +117,15 @@ Any other values of the `attribution` tag should NOT be discarded. > [!IMPORTANT] > Action Required: If you use this file, ensure that your code handles the new format. -## 6. No more references ([#281](https://github.com/ideditor/schema-builder/pull/281)) +## 6. New icon set ([#300](https://github.com/ideditor/schema-builder/pull/300)) + +`pinhead-` prefixed icon codes are now allowed and point to [https://pinhead.ink/](https://pinhead.ink/) project. Support for one more icon set should be added. + +Icons can be obtained from `https://pinhead.ink/latest/{ID}.svg` for `pinhead-{ID}` icon reference. + +See also [bundling proposal](https://github.com/openstreetmap/id-tagging-schema/issues/2208) considered to be added in future (feedback welcome). + +## 7. No more references ([#281](https://github.com/ideditor/schema-builder/pull/281)) If you currently parse the fields `stringsCrossReference` or `iconsCrossReference`, or if you handle the reference syntax (such as `"{natural/beach}"`), all this logic can be now be deleted. @@ -129,6 +137,6 @@ It also allows iD-tagging-schema to implement new internal referencing logic (su > [!IMPORTANT] > Action Required: None. Optionally, you could delete this logic from your code. -## 7. Other changes +## 8. Other changes See the [CHANGELOG.md](./CHANGELOG.md) file for the 3 other non-breaking changes to the schema. diff --git a/lib/build.js b/lib/build.js index 36c53ca..8932664 100644 --- a/lib/build.js +++ b/lib/build.js @@ -638,6 +638,9 @@ function generateTaginfo(presets, fields, deprecated, discarded, tstrings, proje } else if (/^fa[srb]-/.test(preset.icon)) { tag.icon_url = 'https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/fontawesome/' + preset.icon + '.svg'; + } else if (/^pinhead-/.test(preset.icon)) { + tag.icon_url = 'https://pinhead.ink/latest/' + + preset.icon.replace(/^pinhead-/, '') + '.svg'; } else if (/^iD-/.test(preset.icon)) { tag.icon_url = 'https://cdn.jsdelivr.net/gh/openstreetmap/iD@develop/svg/iD-sprite/presets/' + preset.icon.replace(/^iD-/, '') + '.svg';