Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Support for Foreign Fonts using I18N plugin
#1
So far, I'm very happy to see the I18N plugin. It has helped the site so much in terms of internationalization. However, I just realized that now I have my English site pretty with exotic fonts, what about my Chinese site?
Well, the fonts I used from Google Font Library doesn't seem to have corresponding fonts for Chinese (or many other languages for that matter), so it falls back to the default font. And the Chinese page ended up looking dreadful and inflexible.
I guess my question is, how can I load a specific font (for the Chinese language) into my website? And does someone know if I can create and upload my Chinese font to Google's Font Library?

Regards,
Angela
Reply
#2
Angela,

you can use a service like Font Squirrel to upload fonts and have them ready-made for inclusion via the CSS @font-face technique.

You cannot upload any fonts to Google Webfonts, you can only suggest a font for inclusion if you're a font designer. A short search on their site brought up this info. (hint-hint ;-))
Reply
#3
Well, I think font hosting only solves part of my issue. You see, when I select to use a particular font, for example, verdana, it's set in the CSS files. Fonts for another language, like Chinese, of course uses a different font. And because verdana (in this example) doesn't have its Chinese corresponding fonts, then the browser falls back to use the default, whatever that's available on this system.

I want to know how I can tell GetSimple to use a different font when using a different language. I think this may be something to do with how the I18N plugin works.

Regards,
Angela
Reply
#4
angelazou Wrote:Well, I think font hosting only solves part of my issue. You see, when I select to use a particular font, for example, verdana, it's set in the CSS files. Fonts for another language, like Chinese, of course uses a different font. And because verdana (in this example) doesn't have its Chinese corresponding fonts, then the browser falls back to use the default, whatever that's available on this system.

I want to know how I can tell GetSimple to use a different font when using a different language. I think this may be something to do with how the I18N plugin works.

Regards,
Angela

You can add a CSS class with the current language to e.g. the body of the page
Code:
<body ... class="<?php echo @$language; ?>">
and then set a font based on this class in your style sheet:
Code:
body.zh {
  font-family: ...
}
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#5
Thanks for the tip, i got it now.
Reply




Users browsing this thread: 1 Guest(s)