Support Forum

vincent
vincent
Offline
What I want to do can be done in CSS:
font-family: Open Sans, Microsoft Yahei


But I'd like to do it gracefully in the Font Picker. Take Paradise for example, by default, the value of "Body" in the Font Picker is
family=Open+Sans:700,400,400italic


I've tried changing it to
family=Open+Sans:700,400,400italic, Microsoft+Yahei

family=Open+Sans:700,400,400italic, Microsoft Yahei

family=Open+Sans:700,400,400italic, "Microsoft Yahei"


None of these works, though.
Responses (3)
  • Accepted Answer

    Thursday, November 14 2019, 12:47 AM - #Permalink
    Hello Vincent,

    You cannot set multiple fonts from the Font Picker.
    The Font Picker just tells the Gantry 5 framework what font to load.
    Then you use the font in your SCSS. Have a look at the _typography.scss file (ROOT/templates/TEMPLATE_NAME/scss/TEMPLATE_NAME).
    As you can see, first you need to import the font at the top of the file and then you can use it like this:

    body {
    font-family: get-font-family($fonts-body-font);
    }


    So you can just add the following code to your custom.scss file (first import the font at the top):

    body {
    font-family: get-font-family($fonts-body-font), "Microsoft Yahei";
    }


    But the way, in your example font-family: Open Sans, Microsoft Yahei, the "Microsoft Yahei" is a fallback font. It means that if, and only if, the "Open Sans" font is not available, then the element will use the "Microsoft Yahei" font.
    That being said, I do not see a real use case for what you want to achieve.
    The reply is currently minimized Show
  • Accepted Answer

    vincent
    vincent
    Offline
    Thursday, November 14 2019, 04:11 AM - #Permalink
    Thanks for the clarification, you are much more helpful than RT's customer support. Microsoft Yahei is for Chinese characters, that is why.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, November 14 2019, 06:55 PM - #Permalink
    You are welcome Vincent!
    Alright, I see :)
    The reply is currently minimized Show
Your Reply

Become an insider | Subscribe to our Newsletter
Subscribe to our mailing list and stay up-to-date with all our awesome releases, latest updates and amazing discount offers!