Posts: 54
Threads: 10
Joined: Mar 2011
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
Posts: 524
Threads: 48
Joined: Mar 2011
2011-05-24, 00:06:47
(This post was last modified: 2011-05-24, 00:11:52 by infos.media.)
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 ;-))
Posts: 54
Threads: 10
Joined: Mar 2011
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
Posts: 2,094
Threads: 54
Joined: Jan 2011
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: ...
}
Posts: 54
Threads: 10
Joined: Mar 2011
Thanks for the tip, i got it now.