typst / typst/codex

Flag sequences

Open
#115 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

multi-character symbols proposal
Dominant language
Rust
Stars
53
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Unicode has two mechanisms for encoding regional flags

  1. A pair of regional indicators (https://unicode.org/reports/tr51/#Flags). Only a subset of these pairs, determined by the CLDR, are valid. Valid pairs can never become invalid, only deprecated, so there's backwards compatibility.
  2. Emoji tag sequences (https://unicode.org/reports/tr51/#valid-emoji-tag-sequences) for subregions. In principle this can be used for thousands of subregions, but due to lack of font support the only three marked as "recommended for general interchange" are the ones for the three countries making up the UK.

We should add support for these, for instance through flag.de, flag.gb, flag.un, flag.eu ((macro)regions) and flag.gb.eng (subregion). Only valid sequences should be accepted.

One question is whether support for other subregions than the UK ones should be added. I did find at least one font that supports more subregions (https://www.babelstone.co.uk/Fonts/Flags.html).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the issue's Unicode TR51 references and locating the existing flag notation and validation behavior in the repository. Define support for valid regional-indicator pairs and the recommended UK tag sequences, then resolve whether additional subregions belong in scope; done means invalid sequences are rejected and the listed examples are accepted.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
internationalization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.