{"id":276,"date":"2020-09-27T23:29:37","date_gmt":"2020-09-27T15:29:37","guid":{"rendered":"http:\/\/apps.badjoerichards.com\/apps\/developerhack\/?p=276"},"modified":"2020-09-29T18:25:23","modified_gmt":"2020-09-29T10:25:23","slug":"how-to-swap-out-google-fonts-for-china-users","status":"publish","type":"post","link":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/","title":{"rendered":"How to swap out google fonts for China users?"},"content":{"rendered":"<p>Currently a custom protocol is used, will create and release library soon!<\/p>\n<p>Check out ajax.php , the method &#8220;get_visitor_country&#8221; and go through the flow. Create a library from this.<\/p>\n<p>&nbsp;<\/p>\n<p>To use:<\/p>\n<ol>\n<li>\u00a0Find the google fonts that are used on the page.<\/li>\n<li>Download them using: https:\/\/google-webfonts-helper.herokuapp.com\/<\/li>\n<li>You should open the link i.e. &#8220;https:\/\/fonts.googleapis.com\/css?family=Source+Sans+Pro:300,400,600,700|Roboto:300,400,500,700&amp;display=swap&#8221; to see what settings to download on the herokuapp page.<\/li>\n<li>Now create a new CSS file i.e. \/static\/china_fonts\/vip_page.css<\/li>\n<li>On the herokuapp page, enter the path\/folder name you will place the font files for that font (Customize folder prefix (optional):)\u00a0 i.e. source_sans_pro\/<\/li>\n<li>Create the folder in Step 5, i.e. \/static\/china_fonts\/source_sans_pro<\/li>\n<li>Download the fonts.zip file from herokuapp page, and extract the font files into the folder in Step 6.<\/li>\n<li>Look for \/\/ &lt;!&#8211; step 1: china google fonts &#8211;&gt; in controllers\/pages.php , load AJAX library<\/li>\n<li>Look for &lt;!&#8211; step 2: china google fonts &#8211;&gt;\u00a0 in views\/pages\/say_that_you_love_me\/en\/php<\/li>\n<li>Look for &lt;!&#8211; step 3: china google fonts &#8211;&gt; to run the ajax message in the same file in Step 9.<\/li>\n<li>That&#8217;s it!<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Currently a custom protocol is used, will create and release library soon! Check out ajax.php , the method &#8220;get_visitor_country&#8221; and go through the flow. Create a library from this. &nbsp; To use: \u00a0Find the google fonts that are used on the page. Download them using: https:\/\/google-webfonts-helper.herokuapp.com\/ You should open the link i.e. &#8220;https:\/\/fonts.googleapis.com\/css?family=Source+Sans+Pro:300,400,600,700|Roboto:300,400,500,700&amp;display=swap&#8221; to see &hellip; <a href=\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to swap out google fonts for China users?&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to swap out google fonts for China users? - Developer Hack<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to swap out google fonts for China users? - Developer Hack\" \/>\n<meta property=\"og:description\" content=\"Currently a custom protocol is used, will create and release library soon! Check out ajax.php , the method &#8220;get_visitor_country&#8221; and go through the flow. Create a library from this. &nbsp; To use: \u00a0Find the google fonts that are used on the page. Download them using: https:\/\/google-webfonts-helper.herokuapp.com\/ You should open the link i.e. &#8220;https:\/\/fonts.googleapis.com\/css?family=Source+Sans+Pro:300,400,600,700|Roboto:300,400,500,700&amp;display=swap&#8221; to see &hellip; Continue reading &quot;How to swap out google fonts for China users?&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/\" \/>\n<meta property=\"og:site_name\" content=\"Developer Hack\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-27T15:29:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-09-29T10:25:23+00:00\" \/>\n<meta name=\"author\" content=\"Bad Joe\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bad Joe\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/#website\",\"url\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/\",\"name\":\"Developer Hack\",\"description\":\"Hacks, tips, tricks and best practices for developers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/\",\"url\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/\",\"name\":\"How to swap out google fonts for China users? - Developer Hack\",\"isPartOf\":{\"@id\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/#website\"},\"datePublished\":\"2020-09-27T15:29:37+00:00\",\"dateModified\":\"2020-09-29T10:25:23+00:00\",\"author\":{\"@id\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/#\/schema\/person\/01df012e94dd976ac49e50cdbf0e38d6\"},\"breadcrumb\":{\"@id\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to swap out google fonts for China users?\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/#\/schema\/person\/01df012e94dd976ac49e50cdbf0e38d6\",\"name\":\"Bad Joe\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5d413dbb6a01d82a56f2ceb6a82e8704?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5d413dbb6a01d82a56f2ceb6a82e8704?s=96&d=mm&r=g\",\"caption\":\"Bad Joe\"},\"url\":\"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to swap out google fonts for China users? - Developer Hack","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/","og_locale":"en_US","og_type":"article","og_title":"How to swap out google fonts for China users? - Developer Hack","og_description":"Currently a custom protocol is used, will create and release library soon! Check out ajax.php , the method &#8220;get_visitor_country&#8221; and go through the flow. Create a library from this. &nbsp; To use: \u00a0Find the google fonts that are used on the page. Download them using: https:\/\/google-webfonts-helper.herokuapp.com\/ You should open the link i.e. &#8220;https:\/\/fonts.googleapis.com\/css?family=Source+Sans+Pro:300,400,600,700|Roboto:300,400,500,700&amp;display=swap&#8221; to see &hellip; Continue reading \"How to swap out google fonts for China users?\"","og_url":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/","og_site_name":"Developer Hack","article_published_time":"2020-09-27T15:29:37+00:00","article_modified_time":"2020-09-29T10:25:23+00:00","author":"Bad Joe","twitter_card":"summary","twitter_misc":{"Written by":"Bad Joe","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/#website","url":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/","name":"Developer Hack","description":"Hacks, tips, tricks and best practices for developers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/","url":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/","name":"How to swap out google fonts for China users? - Developer Hack","isPartOf":{"@id":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/#website"},"datePublished":"2020-09-27T15:29:37+00:00","dateModified":"2020-09-29T10:25:23+00:00","author":{"@id":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/#\/schema\/person\/01df012e94dd976ac49e50cdbf0e38d6"},"breadcrumb":{"@id":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/how-to-swap-out-google-fonts-for-china-users\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/"},{"@type":"ListItem","position":2,"name":"How to swap out google fonts for China users?"}]},{"@type":"Person","@id":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/#\/schema\/person\/01df012e94dd976ac49e50cdbf0e38d6","name":"Bad Joe","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5d413dbb6a01d82a56f2ceb6a82e8704?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5d413dbb6a01d82a56f2ceb6a82e8704?s=96&d=mm&r=g","caption":"Bad Joe"},"url":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/wp-json\/wp\/v2\/posts\/276"}],"collection":[{"href":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/wp-json\/wp\/v2\/comments?post=276"}],"version-history":[{"count":5,"href":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/wp-json\/wp\/v2\/posts\/276\/revisions"}],"predecessor-version":[{"id":281,"href":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/wp-json\/wp\/v2\/posts\/276\/revisions\/281"}],"wp:attachment":[{"href":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/wp-json\/wp\/v2\/media?parent=276"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/wp-json\/wp\/v2\/categories?post=276"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/apps.badjoerichards.com\/apps\/developerhack\/wp-json\/wp\/v2\/tags?post=276"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}