Jump to content

Customising Chinese characters when main font that doesn't have these?

Go to solution Solved by tuanphan,

Recommended Posts

Posted

Hi there!

 

How can I change just the font of the Chinese characters after WANDER WANDER WILD WILD? On both my navigation page and page for the project, the Chinese font is default to the last one I used before customising. I would like to be able to change to another font that looks more like the website title. I had to use a .png to create that but am struggling with changing them here...

 

This is currently my CSS - I am only new to this so any help is appreciated:

 

/* Fix portfolio */
body.homepage article section:first-child {
    padding-top: 0 !important;
}

@font-face {
font-family: 'PEARL';
src: url('https://static1.squarespace.com/static/6058a6f3664b9e2e27456e5c/t/6579c8844285d33df676dfe1/1702480005051/TAN-PEARL.ttf');
 } 

h1, h2, h3, h4 {
  font-family: 'PEARL';
}

span.portfolio-hover-item-content {
  font-size: 45px;
  font-family: 'PEARL'
}

//DESKTOP//
.header-nav-item a {
  font-size: 20px;
  font-family: 'PEARL'
}

main-nav ul li.active-link a,

.main-nav ul li.active-link a:visited {
     border-bottom: 50px solid #000000;
 }

//MOBILE//
.header-menu-nav-item a {
  font-size: 30px;
  margin: 4rem 0;
  font-family: 'PEARL'
}

.header-layout-nav-right .header-nav {
text-align: center;
}

Screenshot 2023-12-13 at 16.22.51.png

Screenshot 2023-12-13 at 16.27.55.png

  • Replies 6
  • Views 1.5k
  • Created
  • Last Reply

Top Posters In This Topic

Posted
On 12/15/2023 at 3:11 AM, tuanphan said:

What is site url? We can check easier

It's: choypingclarkeng.com 

 

Thanks!

  • Solution
Posted

Add this code to Website Tools (under Not Linked) > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $("span.portfolio-hover-item-content:contains('遊遊野野')").html(function(_, html) {
   return html.replace(/(遊遊野野)/g, '<span class="chinese">$1</span>');
});
</script>
<style>
  span.chinese {
    font-family: 'PEARL' !important;
    color: #f1f !important;
}
</style>

image.thumb.png.c6075426cbf8630fc1b37f06e437453f.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Posted
2 hours ago, tuanphan said:

Add this code to Website Tools (under Not Linked) > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
  $("span.portfolio-hover-item-content:contains('遊遊野野')").html(function(_, html) {
   return html.replace(/(遊遊野野)/g, '<span class="chinese">$1</span>');
});
</script>
<style>
  span.chinese {
    font-family: 'PEARL' !important;
    color: #f1f !important;
}
</style>

image.thumb.png.c6075426cbf8630fc1b37f06e437453f.png

Sorry I have one more question as well as the above - how to change the Chinese font on this page? Again for the characters 

遊遊野野
 

https://www.choypingclarkeng.com/theatremaking/wwww

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.