From: Simon Cozens Date: Fri, 1 Nov 2024 11:04:07 +0000 (+0000) Subject: Merge commit 'a495359cdf3c536688f79f712554d55afb902615' into lang-0.7.0 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F8451%2Fhead;p=thirdparty%2Fgoogle%2Ffonts.git Merge commit 'a495359cdf3c536688f79f712554d55afb902615' into lang-0.7.0 --- dbb63139ab7acdc4b7e06d827daa32bb89c8fc07 diff --cc lang/Lib/gflanguages/data/languages/bap_Krai.textproto index 0000000000,6042f0640a..6042f0640a mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/bap_Krai.textproto +++ b/lang/Lib/gflanguages/data/languages/bap_Krai.textproto diff --cc lang/Lib/gflanguages/data/languages/gwd_Latn.textproto index 0000000000,86e5736dcc..86e5736dcc mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/gwd_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/gwd_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/hdy_Latn.textproto index 0000000000,a6b6b6b2c3..a6b6b6b2c3 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/hdy_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/hdy_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/irk_Latn.textproto index 0000000000,66506a75a3..66506a75a3 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/irk_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/irk_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/kbo_Latn.textproto index 0000000000,f33a283f52..f33a283f52 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/kbo_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/kbo_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/kdj_Latn.textproto index 0000000000,f7e9effaf3..f7e9effaf3 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/kdj_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/kdj_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/krw_Latn.textproto index 0000000000,3affcde479..3affcde479 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/krw_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/krw_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/lom_Latn.textproto index 0000000000,32cc3e1b37..32cc3e1b37 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/lom_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/lom_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/mne_Latn.textproto index 0000000000,5949500ecd..5949500ecd mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/mne_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/mne_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/one_Latn.textproto index 0000000000,85e7c7bbbd..85e7c7bbbd mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/one_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/one_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/tce_Latn.textproto index 0000000000,233f6b3524..233f6b3524 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/tce_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/tce_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/tsb_Latn.textproto index 0000000000,9ea762b041..9ea762b041 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/tsb_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/tsb_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/ttm_Latn.textproto index 0000000000,bc79a2b4ee..bc79a2b4ee mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/ttm_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/ttm_Latn.textproto diff --cc lang/Lib/gflanguages/data/languages/wok_Latn.textproto index 0000000000,d44efc0eb0..d44efc0eb0 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/languages/wok_Latn.textproto +++ b/lang/Lib/gflanguages/data/languages/wok_Latn.textproto diff --cc lang/Lib/gflanguages/data/scripts/Gara.textproto index 0000000000,249f6c7cfd..249f6c7cfd mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/scripts/Gara.textproto +++ b/lang/Lib/gflanguages/data/scripts/Gara.textproto diff --cc lang/Lib/gflanguages/data/scripts/Gukh.textproto index 0000000000,90cc9b6e69..90cc9b6e69 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/scripts/Gukh.textproto +++ b/lang/Lib/gflanguages/data/scripts/Gukh.textproto diff --cc lang/Lib/gflanguages/data/scripts/Krai.textproto index 0000000000,27545aa730..27545aa730 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/scripts/Krai.textproto +++ b/lang/Lib/gflanguages/data/scripts/Krai.textproto diff --cc lang/Lib/gflanguages/data/scripts/Onao.textproto index 0000000000,8272a64ec1..8272a64ec1 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/scripts/Onao.textproto +++ b/lang/Lib/gflanguages/data/scripts/Onao.textproto diff --cc lang/Lib/gflanguages/data/scripts/Sunu.textproto index 0000000000,70e470aa91..70e470aa91 mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/scripts/Sunu.textproto +++ b/lang/Lib/gflanguages/data/scripts/Sunu.textproto diff --cc lang/Lib/gflanguages/data/scripts/Tutg.textproto index 0000000000,c8a603ab9c..c8a603ab9c mode 000000,100644..100644 --- a/lang/Lib/gflanguages/data/scripts/Tutg.textproto +++ b/lang/Lib/gflanguages/data/scripts/Tutg.textproto diff --cc lang/README.md index 7e448bf7e2,0000000000..c1db1e8600 mode 100644,000000..100644 --- a/lang/README.md +++ b/lang/README.md @@@ -1,16 -1,0 +1,37 @@@ +This python module provides an API with data about languages/regions/scripts for use in the language-support categorization of the font families in the Google Fonts collection. + +You can also directly access the raw **textproto** files on the `Lib/gflanguages/data` directory: +* [`languages`](https://github.com/googlefonts/lang/tree/main/Lib/gflanguages/data/languages) +* [`regions`](https://github.com/googlefonts/lang/tree/main/Lib/gflanguages/data/regions) +* [`scripts`](https://github.com/googlefonts/lang/tree/main/Lib/gflanguages/data/scripts) + +Most of the code in this project was copied from the `gftools` repository (https://github.com/googlefonts/gftools/) so that language/region/script data can be easily available to all our tools without having to also get the large dependency tree of `gftools`. The most immediate user of this module is `Font Bakery`, which needs to validate language support on font binaries being checked. (see https://github.com/googlefonts/fontbakery/issues/3605) + +The second obvious user of this `gflanguages` module is `gftools` itself. + +Language/region/script definitions and the `gflanguages` modules are used as a subtree in the `google/fonts` repo, on its **lang/** directory (https://github.com/google/fonts/tree/main/lang). + +This module is the main place to update these definitions, avoiding data duplication and guaranteeing uniformity across tools. + +To learn more about how *lang* metadata affects downstream, see [gf-guide/lang](https://googlefonts.github.io/gf-guide/lang). ++ ++## Sample text rules ++ ++If there is a `sample_text` field for a language, it should contain all of the following fields: ++ ++* `masthead_full`: show off four glyphs ++* `masthead_partial`: show off two glyphs ++* `styles`: a phrase of 40-60 characters ++* `tester`: a phrase of 60-90 characters ++* `poster_sm`: a word or phrase of 10-17 characters ++* `poster_md`: a word or phrase of 6-12 characters ++* `poster_lg`: a word or phrase of 3-8 characters ++* `specimen_48`: a sentence of 50-80 characters ++* `specimen_36`: a paragraph of 100-120 characters ++* `specimen_32`: a paragraph of 140-180 characters ++* `specimen_21`: one or more paragraphs totalling 300-500 characters ++* `specimen_16`: one or more paragraphs totalling 550-750 characters ++ ++Generally the sample text should be taken from the UN Declaration of Human Rights; if using Eric Muller's XML translations, `snippets/lang_sample_text.py` will convert the XML into textproto. ++ ++If the UDHR is not available in the language, the sample text should be a "neutral" text (not political or religious) - folk tales are generally good sources. (We recognise that for some liturgical languages, religious texts may be the only extant samples.) In these cases, please add a `note:` field with the source of the sample text.