diff --git a/library/composables/useDocumentFont.js b/library/composables/useDocumentFont.js index 5a9e22136..86c3e07d2 100644 --- a/library/composables/useDocumentFont.js +++ b/library/composables/useDocumentFont.js @@ -81,6 +81,16 @@ export const BEBAS_NEUE_FACES = [ // Google's own unicode-ranges (css2 v24) so the subset split behaves as it does on their site. const POPPINS_LATIN = 'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD' const POPPINS_LATIN_EXT = 'U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF' +// FIGTREE — the free stand-in for Brandon Grotesque, which is COMMERCIAL and must not ship in a +// public giveaway (Driver decision 2026-09-24). Chosen by measurement: at 500/19.5312px it renders +// their button text at 126px against Brandon's 128px on live doxa.life, the closest of 19 libre +// grotesques; Inter was +6 and Archivo +7. Weight 500 only — that is the single weight the two +// rules that named Brandon actually use. +export const FIGTREE_FACES = [ + { weight: '500', src: 'fonts/figtree/figtree-500-latin.woff2', unicodeRange: POPPINS_LATIN }, + { weight: '500', src: 'fonts/figtree/figtree-500-latin-ext.woff2', unicodeRange: POPPINS_LATIN_EXT }, +] + export const POPPINS_FACES = [ { weight: '400', src: 'fonts/poppins/poppins-400-latin.woff2', unicodeRange: POPPINS_LATIN }, { weight: '400', src: 'fonts/poppins/poppins-400-latin-ext.woff2', unicodeRange: POPPINS_LATIN_EXT }, diff --git a/plugin-designs/regions-dashboard/region-dashboards.vue b/plugin-designs/regions-dashboard/region-dashboards.vue index 1dcf51650..3e9acb701 100644 --- a/plugin-designs/regions-dashboard/region-dashboards.vue +++ b/plugin-designs/regions-dashboard/region-dashboards.vue @@ -28,7 +28,7 @@ import { useShadowStyles } from '@map/composables/useShadowStyles.js' // house pattern (doxa-simple-map.vue:18, :246, :1346) — an EMBEDDED element must not reach for // document.documentElement.dir, which belongs to the host page. import { RTL_LOCALES } from '@map/i18n/index.js' -import { useDocumentFont, BEBAS_NEUE_FACES, POPPINS_FACES } from '@map/composables/useDocumentFont.js' +import { useDocumentFont, BEBAS_NEUE_FACES, POPPINS_FACES, FIGTREE_FACES } from '@map/composables/useDocumentFont.js' import FilterDropdown from '@map/components/search/FilterDropdown.vue' import UupgsList from './src/UupgsList.vue' // Their strings, via their own English keys (see src/useRegionsI18n.js). The goal sentences, @@ -97,6 +97,10 @@ useDocumentFont('Bebas Neue', BEBAS_NEUE_FACES, assetsBase.value) // computed-style diff, which read 68/68 while our body text was a system fallback 5.5% // wider per glyph. Registered the same way and for the same reason as Bebas. useDocumentFont('Poppins', POPPINS_FACES, assetsBase.value) +// Figtree stands in for Brandon Grotesque, which is commercial and must not ship in a public +// giveaway (Driver, 2026-09-24). @font-face is DOCUMENT-scoped, so it registers here beside +// the other two rather than inside the shadow root that uses it. +useDocumentFont('Figtree', FIGTREE_FACES, assetsBase.value) // ── state ─────────────────────────────────────────────────────────────────── const { t, tf , locale } = useRegionsI18n() diff --git a/plugin-designs/regions-dashboard/regions-list.vue b/plugin-designs/regions-dashboard/regions-list.vue index 617611f1e..b790fd481 100644 --- a/plugin-designs/regions-dashboard/regions-list.vue +++ b/plugin-designs/regions-dashboard/regions-list.vue @@ -38,7 +38,7 @@ import { useRegionsI18n } from './src/useRegionsI18n.js' // document.documentElement.dir, which belongs to the host page. import { RTL_LOCALES } from '@map/i18n/index.js' import { useI18n } from 'vue-i18n' -import { useDocumentFont, BEBAS_NEUE_FACES, POPPINS_FACES } from '@map/composables/useDocumentFont.js' +import { useDocumentFont, BEBAS_NEUE_FACES, POPPINS_FACES, FIGTREE_FACES } from '@map/composables/useDocumentFont.js' import { summarizeRegions, PEOPLE_GROUP_LIST_FIELDS } from '@map/utils/countries-meta.js' // DX-life's spacing/type scales under THEIR token names. Prepended to this // component's shadow CSS so every var() below resolves inside the shadow root. @@ -119,6 +119,10 @@ useDocumentFont('Bebas Neue', BEBAS_NEUE_FACES, assetsBase.value) // computed-style diff, which read 68/68 while our body text was a system fallback 5.5% // wider per glyph. Registered the same way and for the same reason as Bebas. useDocumentFont('Poppins', POPPINS_FACES, assetsBase.value) +// Figtree stands in for Brandon Grotesque, which is commercial and must not ship in a public +// giveaway (Driver, 2026-09-24). @font-face is DOCUMENT-scoped, so it registers here beside +// the other two rather than inside the shadow root that uses it. +useDocumentFont('Figtree', FIGTREE_FACES, assetsBase.value) // ── state ─────────────────────────────────────────────────────────────────── const regions = ref([]) diff --git a/plugin-designs/regions-dashboard/src/UupgsList.vue b/plugin-designs/regions-dashboard/src/UupgsList.vue index d6f6d36a3..c7e5aa1f1 100644 --- a/plugin-designs/regions-dashboard/src/UupgsList.vue +++ b/plugin-designs/regions-dashboard/src/UupgsList.vue @@ -407,7 +407,14 @@ useShadowStyles( ' box-sizing:border-box; padding:10px var(--spacing-2xl); color:#f3f3f1; background:#92b195;' + ' border-radius:100px; border:1px solid transparent; line-height:1; text-decoration:none;' + ' text-transform:uppercase; font-size:var(--font-size-md);' + - ' font-family:"Brandon Grotesque",Poppins,-apple-system,"Segoe UI",sans-serif;' + + // THEIR FAMILY IS "Brandon Grotesque", WHICH IS COMMERCIAL — the one substitution RULE 1 + // allows, and the Driver ruled it must not ship in a public giveaway (2026-09-24). + // Figtree chosen by MEASUREMENT, not by name: on live doxa.life their button renders + // 'FULL PROFILE' at 128.00px in Brandon at 500/19.5312px. Of 19 libre grotesques measured + // the same way, Figtree is 126 (-2.00) — closest — against Inter 134, Archivo 135, + // Poppins 119, Montserrat 148. (The 134.33 in the old scorecard is the GENERIC SANS + // fallback, not Brandon; their page really does load Brandon_Grotesque_medium.woff2.) + ' font-family:Figtree,Poppins,-apple-system,"Segoe UI",sans-serif;' + ' transition:background-color .3s ease, color .3s ease; cursor:pointer; }' + '.uupg__more-button:hover{ background:#2a332a; color:#f3f3f1; }' + // their 576px reflow: the photo and the header stop sharing a row @@ -420,7 +427,7 @@ useShadowStyles( '.ul-more{ margin-inline:auto; margin-top:var(--spacing-2xl); display:block; width:fit-content;' + ' padding:10px var(--spacing-2xl); color:#f3f3f1; background:#92b195; border-radius:100px;' + ' border:1px solid transparent; line-height:1; text-transform:uppercase; font-size:var(--font-size-md);' + - ' font-family:"Brandon Grotesque",Poppins,-apple-system,"Segoe UI",sans-serif; cursor:pointer; }' + + ' font-family:Figtree,Poppins,-apple-system,"Segoe UI",sans-serif; cursor:pointer; }' + '.ul-more:hover{ background:#2a332a; }', 'uupgs-list' ) diff --git a/public/assets/fonts/figtree/LICENSE b/public/assets/fonts/figtree/LICENSE new file mode 100644 index 000000000..de97ffce2 --- /dev/null +++ b/public/assets/fonts/figtree/LICENSE @@ -0,0 +1,100 @@ +Figtree — SIL Open Font License, Version 1.1 +Designer: Erik D. Kennedy. Distributed via Google Fonts. +Vendored as the free stand-in for Brandon Grotesque (commercial), by Driver decision +2026-09-24. Chosen by MEASUREMENT, not by name: at 500/19.5312px Figtree renders +'FULL PROFILE' at 126px against Brandon's 128px on live doxa.life — the closest of 19 +libre grotesques tested. See _probe-glyph-width.mjs. + +Copyright 2022 The Figtree Project Authors (https://github.com/erikdkennedy/figtree) + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/public/assets/fonts/figtree/figtree-500-latin-ext.woff2 b/public/assets/fonts/figtree/figtree-500-latin-ext.woff2 new file mode 100644 index 000000000..4cf844204 Binary files /dev/null and b/public/assets/fonts/figtree/figtree-500-latin-ext.woff2 differ diff --git a/public/assets/fonts/figtree/figtree-500-latin.woff2 b/public/assets/fonts/figtree/figtree-500-latin.woff2 new file mode 100644 index 000000000..6ab558832 Binary files /dev/null and b/public/assets/fonts/figtree/figtree-500-latin.woff2 differ