[wp-trac] [WordPress Trac] #59876: Theme.json fontWeight issue with shared slug names and fontFace

WordPress Trac noreply at wordpress.org
Mon Dec 4 12:34:38 UTC 2023


#59876: Theme.json fontWeight issue with shared slug names and fontFace
--------------------------+----------------------
 Reporter:  dogwonder     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Themes        |     Version:  6.4
 Severity:  minor         |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+----------------------

Comment (by dogwonder):

 Excellent thanks for pointing out @ironprogrammer !

 I've amended the theme.json with the following and all appears to be
 working as expected. Many thanks for pointing me in the right direction.


 {{{
 {
                                         "name": "Colfax",
                                         "slug": "colfax-web",
                                         "fontFamily": "\"colfax-web\",
 sans-serif",
                                         "fontFace": [
                                                 {
                                                         "fontFamily":
 "colfax-web",
                                                         "fontWeight":
 "400",
                                                         "fontStyle":
 "normal",
                                                         "fontStretch":
 "normal",
                                                         "src": [
 "file:./dist/fonts/colfax-web/ColfaxWebRegular.woff2" ]
                                                 },
                                                 {
                                                         "fontFamily":
 "colfax-web",
                                                         "fontWeight":
 "500",
                                                         "fontStyle":
 "normal",
                                                         "fontStretch":
 "normal",
                                                         "src": [
 "file:./dist/fonts/colfax-web/ColfaxWebMedium.woff2" ]
                                                 },
                                                 {
                                                         "fontFamily":
 "colfax-web",
                                                         "fontWeight":
 "700",
                                                         "fontStyle":
 "normal",
                                                         "fontStretch":
 "normal",
                                                         "src": [
 "file:./dist/fonts/colfax-web/ColfaxWebBold.woff2" ]
                                                 },
                                                 {
                                                         "fontFamily":
 "colfax-web",
                                                         "name": "Colfax
 Web - Black",
                                                         "slug": "colfax-
 web",
                                                         "fontFamily":
 "colfax-web",
                                                         "fontWeight":
 "900",
                                                         "fontStyle":
 "normal",
                                                         "src": [
 "file:./dist/fonts/colfax-web/ColfaxWebBlack.woff2" ]
                                                 }
                                         ]
                                 },
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59876#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list