marseymoji/third_party/region-flags
Doug Felt 9d977df32c Update region-flags from upstream.
This updates the svg, png, and html resources from behdad/region-flags.
It also updates the LICENSE (COPYING) and README.md files from there.

Formerly our copy contained only a few subregion flags, but this change
adds them all from upstream.

Also formerly we explicitly used symlinks in our data for flags that
are the same as other country flags.  Now however we just use the
upstream data.  Note that the emoji_aliases.txt file will still
cause the font to only have one copy of these.

Note this also deletes the copy of IC.png that somehow had found its
way into the region-flags directory.

Use big glyph metrics to support vertical text rendering
2018-01-02 12:35:41 -08:00
..
html Update region-flags from upstream. 2018-01-02 12:35:41 -08:00
png Update region-flags from upstream. 2018-01-02 12:35:41 -08:00
svg Update region-flags from upstream. 2018-01-02 12:35:41 -08:00
AUTHORS Move emoji-specific third-party and scripts into color_emoji/ 2015-06-05 10:58:41 -07:00
LICENSE Update region-flags from upstream. 2018-01-02 12:35:41 -08:00
README.md Update region-flags from upstream. 2018-01-02 12:35:41 -08:00
README.third_party Move emoji-specific third-party and scripts into color_emoji/ 2015-06-05 10:58:41 -07:00

README.md

Introduction

This package is a collection of flags for geographic region and sub-region codes. The regions are based on the data from BCP 47 and selected sub-regions (US states, Canadian provinces and territories, and some sub-regions of Great Britain) are based on ISO 3166-2:US, ISO 3166-2:CA, and ISO-3166-2:GB.

Most people think of these regions from BCP 47 as country flags, but there are a few codes / flags that do not correspond to countries. The flags are in SVG and PNG format and named by their BCP 47 region code, which for countries is the same as ISO 3166-2 country code. In case of sub-regions, ISO 3166-2 is used for naming the files; e.g. US-DE.png is the flag of the State of Delaware.

The canonical way to get all BCP 47 region codes is to look for records in language-subtag-registry (which is downloaded from IANA Language Subtag Registry) with the following fields:

Type: region
Subtag: [A-Z]{2}
AND NOT Description: Private use
AND NOT Deprecated: .*

Regions not in that repository can be added to language-subtag-private. One such region has been added.

Some regions do not have their own flag. In such cases, they are symlinked to the best flag to represent them, which in most cases is the flag of their regional or political parent. These are listed in file ALIASES.

The sub-regions currently covered are:

  • US states and the District of Columbia
  • Canadian provinces and territories
  • Countries of England, Scotland, and Wales in Great Britain
  • The province Northern Ireland in Great Britain

The flags are downloaded from Wikipedia. When Wikipedia flags were copyrighted, we worked we Wikipedia editors to either relicense them, or drew / sourced and uploaded new public-domain versions. In particular, the license for these flags were resolved for the initial import:

  • Montenegro
  • Nicaragua
  • Sint Maarten
  • Ascension Island
  • Lesotho
  • Kosovo

Scripts

  • The script regions.py lists all regions and some selected sub-regions with their metadata.
  • The script regions-wp.py shows the Wikipedia URL for the flag page.
  • The script missing.sh shows all such regions that we don't have flags for.
  • The script make-aliases.sh makes symlinks for regions that use flag of another region.
  • The script download-wp.py downloads missing flags from Wikipedia and generating optimized SVG and PNG versions.

You can use the waveflag script from the Noto fonts project to wave PNG flags.

Requirements

Updating

If new regions are needed, update language-subtag-registry from IANA Language Subtag Registry, or add new regions to language-subtag-private before. Then update data/ALIASES and data/ALIASES-WP as needed.

If a specific flag on Wikipedia flag is under Creative Commons, work with Wikipedia editors to relicense it to public domain. If the flag is not explicitly marked public_domain but otherwise exempt from Copyright (typically, because of national laws), make a note of it in file COPYING.

To download missing flags, run download-wp.py.

To update to latest flags from Wikipedia, delete the html, svg, and png directories, then run make-aliases.sh followed by download-wp.py.

License

See file COPYING for details.