Skip to content

Commit

Permalink
Merge pull request #1 from matiasbenedetto/update-for-gb-17.6
Browse files Browse the repository at this point in the history
Updates the implementation to match the refactor that will be added in gutenberg 17.6
  • Loading branch information
matiasbenedetto authored Jan 25, 2024
2 parents c770b58 + 9765e54 commit 892fe68
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 70 deletions.
209 changes: 141 additions & 68 deletions collection.json
Original file line number Diff line number Diff line change
@@ -1,100 +1,173 @@
{
"fontFamilies": [
"$schema": "https://schemas.wp.org/trunk/font-collection.json",
"categories": [
{
"slug": "sans-serif",
"name": "Sans Serif"
},
{
"slug": "serif",
"name": "Serif"
},
{
"slug": "monospace",
"name": "Monospace"
},
{
"slug": "handwriting",
"name": "Handwriting"
}
],
"font_families": [
{
"name": "System UI",
"fontFamily": "system-ui, sans-serif",
"slug": "system-ui",
"category": "sans-serif"
"font_family_settings": {
"fontFamily": "system-ui, sans-serif",
"slug": "system-ui",
"name": "System UI"
},
"categories": [
"sans-serif"
]
},
{
"name": "Transitional",
"fontFamily": "Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif",
"slug": "transitional",
"category": "serif"
"font_family_settings": {
"fontFamily": "Charter, 'Bitstream Charter', 'Sitka Text', Cambria, serif",
"slug": "transitional",
"name": "Transitional"
},
"categories": [
"serif"
]
},
{
"name": "Old Style",
"fontFamily": "'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif",
"slug": "old-style",
"category": "serif"
"font_family_settings": {
"fontFamily": "'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif",
"slug": "old-style",
"name": "Old Style"
},
"categories": [
"serif"
]
},
{
"name": "Humanist",
"fontFamily": "Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif",
"slug": "humanist",
"category": "sans-serif"
"font_family_settings": {
"fontFamily": "Seravek, 'Gill Sans Nova', Ubuntu, Calibri, 'DejaVu Sans', source-sans-pro, sans-serif",
"slug": "humanist",
"name": "Humanist"
},
"categories": [
"sans-serif"
]
},
{
"name": "Geometric Humanist",
"fontFamily": "Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif",
"slug": "geometric-humanist",
"category": "sans-serif"
"font_family_settings": {
"fontFamily": "Avenir, Montserrat, Corbel, 'URW Gothic', source-sans-pro, sans-serif",
"slug": "geometric-humanist",
"name": "Geometric Humanist"
},
"categories": [
"sans-serif"
]
},
{
"name": "Classical Humanist",
"fontFamily": "Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif",
"slug": "classical-humanist",
"category": "sans-serif"
"font_family_settings": {
"fontFamily": "Optima, Candara, 'Noto Sans', source-sans-pro, sans-serif",
"slug": "classical-humanist",
"name": "Classical Humanist"
},
"categories": [
"sans-serif"
]
},
{
"name": "Neo-Grotesque",
"fontFamily": "Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif",
"slug": "neo-grotesque",
"category": "sans-serif"
"font_family_settings": {
"fontFamily": "Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif",
"slug": "neo-grotesque",
"name": "Neo-Grotesque"
},
"categories": [
"sans-serif"
]
},
{
"name": "Monospace Slab Serif",
"fontFamily": "'Nimbus Mono PS', 'Courier New', monospace",
"slug": "monospace-slab-serif",
"category": "monospace"
"font_family_settings": {
"fontFamily": "'Nimbus Mono PS', 'Courier New', monospace",
"slug": "monospace-slab-serif",
"name": "Monospace Slab Serif"
},
"categories": [
"monospace"
]
},
{
"name": "Monospace Code",
"fontFamily": "ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace",
"slug": "monospace-code",
"category": "monospace"
"font_family_settings": {
"fontFamily": "ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace",
"slug": "monospace-code",
"name": "Monospace Code"
},
"categories": [
"monospace"
]
},
{
"name": "Industrial",
"fontFamily": "Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif",
"slug": "industrial",
"category": "sans-serif"
"font_family_settings": {
"fontFamily": "Bahnschrift, 'DIN Alternate', 'Franklin Gothic Medium', 'Nimbus Sans Narrow', sans-serif-condensed, sans-serif",
"slug": "industrial",
"name": "Industrial"
},
"categories": [
"sans-serif"
]
},
{
"name": "Rounded Sans",
"fontFamily": "ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif",
"slug": "rounded-sans",
"category": "sans-serif"
"font_family_settings": {
"fontFamily": "ui-rounded, 'Hiragino Maru Gothic ProN', Quicksand, Comfortaa, Manjari, 'Arial Rounded MT', 'Arial Rounded MT Bold', Calibri, source-sans-pro, sans-serif",
"slug": "rounded-sans",
"name": "Rounded Sans"
},
"categories": [
"sans-serif"
]
},
{
"name": "Slab Serif",
"fontFamily": "Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif",
"slug": "slab-serif",
"category": "serif"
"font_family_settings": {
"fontFamily": "Rockwell, 'Rockwell Nova', 'Roboto Slab', 'DejaVu Serif', 'Sitka Small', serif",
"slug": "slab-serif",
"name": "Slab Serif"
},
"categories": [
"serif"
]
},
{
"name": "Antique",
"fontFamily": "Superclarendon, 'Bookman Old Style', 'URW Bookman', 'URW Bookman L', 'Georgia Pro', Georgia, serif",
"slug": "antique",
"category": "serif"
"font_family_settings": {
"fontFamily": "Superclarendon, 'Bookman Old Style', 'URW Bookman', 'URW Bookman L', 'Georgia Pro', Georgia, serif",
"slug": "antique",
"name": "Antique"
},
"categories": [
"serif"
]
},
{
"name": "Didone",
"fontFamily": "Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif",
"slug": "didone",
"category": "serif"
"font_family_settings": {
"fontFamily": "Didot, 'Bodoni MT', 'Noto Serif Display', 'URW Palladio L', P052, Sylfaen, serif",
"slug": "didone",
"name": "Didone"
},
"categories": [
"serif"
]
},
{
"name": "Handwritten",
"fontFamily": "'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive",
"slug": "handwritten",
"category": "handwriting"
"font_family_settings": {
"fontFamily": "'Segoe Print', 'Bradley Hand', Chilanka, TSCu_Comic, casual, cursive",
"slug": "handwritten",
"name": "Handwritten"
},
"categories": [
"handwriting"
]
}
],
"categories": [
{ "id": "sans-serif", "name": "Sans Serif" },
{ "id": "serif", "name": "Serif" },
{ "id": "monospace", "name": "Monospace" },
{ "id": "handwriting", "name": "Handwriting" }
]
}
}
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Plugin Name: Modern Fonts Stacks
Plugin URI: https://github.com/matiasbenedetto/modern-fonts-stacks-for-wp-font-library/
Description: Add a font collection to your WordPress Font Library.
Version: 0.0.1
Version: 0.0.3
Author: Various Authors
Author URI: https://wordpress.org/
License: GPLv2 or later
Text Domain: modern-fonts-stacks
*/

$modern_fonts_config = array (
'id' => 'modern-fonts-stacks',
'slug' => 'modern-fonts-stacks',
'name' => 'Modern Fonts Stacks',
'description' => 'Stacks of modern systems fonts, not font face assets needed. The look will vary on each system.',
'src' => path_join( __DIR__, 'collection.json' ),
Expand Down

0 comments on commit 892fe68

Please sign in to comment.