mirror of
				https://github.com/schmidt1024/monero-flyer.git
				synced 2025-11-03 19:51:44 +00:00 
			
		
		
		
	improve font execption for simplified chinese (zh)
This commit is contained in:
		@@ -61,6 +61,22 @@ loadLanguage = async (lang, save = true) => {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (lang === "zh") {
 | 
				
			||||||
 | 
					    const link = document.createElement("link")
 | 
				
			||||||
 | 
					    link.href = "https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&display=swap"
 | 
				
			||||||
 | 
					    link.rel = "stylesheet"
 | 
				
			||||||
 | 
					    document.head.appendChild(link)
 | 
				
			||||||
 | 
					    document.body.style.fontFamily = "'Noto Serif SC', serif"
 | 
				
			||||||
 | 
					    document.querySelectorAll("h1, h2, h3").forEach((el) => {
 | 
				
			||||||
 | 
					      el.style.fontFamily = "'Noto Serif SC', serif"
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    document.body.style.fontFamily = "'Poppins', sans-serif"
 | 
				
			||||||
 | 
					    document.querySelectorAll("h1, h2, h3").forEach((el) => {
 | 
				
			||||||
 | 
					      el.style.fontFamily = "'Raleway', sans-serif"
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  setPreviewImages()
 | 
					  setPreviewImages()
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -170,18 +186,3 @@ if (currentLanguage === "fa") {
 | 
				
			|||||||
  document.getElementById("kyc_light-desc").remove()
 | 
					  document.getElementById("kyc_light-desc").remove()
 | 
				
			||||||
  document.getElementById("kyc_light-providers").remove()
 | 
					  document.getElementById("kyc_light-providers").remove()
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
if (currentLanguage === "zh") {
 | 
					 | 
				
			||||||
  // load font
 | 
					 | 
				
			||||||
  // <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&display=swap" rel="stylesheet">
 | 
					 | 
				
			||||||
  const link = document.createElement("link")
 | 
					 | 
				
			||||||
  link.href = "https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&display=swap"
 | 
					 | 
				
			||||||
  link.rel = "stylesheet"
 | 
					 | 
				
			||||||
  document.head.appendChild(link)
 | 
					 | 
				
			||||||
  // set font family for body
 | 
					 | 
				
			||||||
  document.body.style.fontFamily = "'Noto Serif SC', serif"
 | 
					 | 
				
			||||||
  // set font family for headings
 | 
					 | 
				
			||||||
  document.querySelectorAll("h1, h2, h3").forEach((el) => {
 | 
					 | 
				
			||||||
    el.style.fontFamily = "'Noto Serif SC', serif"
 | 
					 | 
				
			||||||
  })
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user