FANDOM


  • Hi, I would like to add on my wiki the support for Google's Noto font family. Since I have to use latin, japanese, arabic, etc. characters, I think this font family would be the best. The question is: how can I change the Common.css file in order to tell it to use, for example, Noto Sans/Serif CJK JP for japanese characters and Noto Sans/Serif for latin characters?

      Loading editor
    • Have you read Help:How to import Google Fonts?

      In order to use different fonts for different languages, you need to identify the different languages. For instance:

      This sentence is in English. <span lang="ja">この文は日本語です。</span>
      

      Then, your CSS would look something like this:

      :lang(ja) {
          font-family: "Serif CJK JP",<fallbacks>;
      }

      "<fallbacks>" would be your font fallback sequence (i.e. what the browser should use if the first font doesn't work for whatever reason).

      If I may, there are some things I noticed about your current CSS I would like to mention. First, your import of the ModernRail CSS will not work. It needs to be at the top of Common.css like the other imports. Second, you are missing "MediaWiki:" and have an extra ".css" when importing the RectangularButtons CSS. Third, you can combine all of your CSS imports into a single import.

      @import url("/load.php?mode=articles&only=styles&articles=\
      |u:dev:MediaWiki:FandomizedCommunityRail/code.css\
      |u:dev:MediaWiki:HotkeysStyle.css\
      |u:dev:MediaWiki:InterlanguageFlags.css\
      |u:dev:MediaWiki:MinifiedLeftTabs/code.css\
      |u:dev:MediaWiki:ModernPolls.css\
      |u:dev:MediaWiki:ModernRail.css\
      |u:dev:MediaWiki:NoCustomCursors.css\
      |u:dev:MediaWiki:RectangularButtons/code.css\
      ");

      The above CSS already includes the ModernRail CSS and change to RectangularButtons CSS. You don't have to do it this way but leaving them separate negates the primary benefit of using load.php instead of direct URLs.

        Loading editor
    • Thank you so much!

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message
Community content is available under CC-BY-SA unless otherwise noted.