Vocabulary dictionary

Kanji dictionary

Grammar dictionary

Sentence lookup

test
 

Forums - Font for Japanese characters

Top > renshuu.org > Bugs / Problems > Resolved Bugs



avatar
rtega
Level: 11
Before I could easily change the font of japanese in the site by selecting the font for Japanese in my browser. Only japanese characters would be affected in renshuu. Now it seems to be stuck to some ugly gothic font. I guess something in the css is to strictly applied. Could you change this?
0
11 years ago
Report Content
avatar
マイコー
Level: 292
What's your os/browser, and could you toss us a screenshot so we can see exactly what you're seeing?
0
11 years ago
Report Content
avatar
rtega
Level: 11
[url=http://i.imgur.com/QsJd6wu.png][img]http://i.imgur.com/QsJd6wu.png[/img][/url] I'm on ubuntu trusty, firefox 28.0.
0
11 years ago
Report Content
avatar
マイコー
Level: 292
Hmm - looks the same to me - are you familiar with how to dig in and figure out what font the site is using to render the kanji?
0
11 years ago
Report Content
avatar
rtega
Level: 11
According to the element inspector from my browser it's using: the body { line-height: 1.3; font-family: "ヒラギノゴ Pro W3","Hiragino Kaku Gothic Pro","メイリオ",Meiryo,Osaka,'Open Sans','Helvetica','Neue',"MS Pゴシック","MS PGothic",sans-serif; } part from pc.css line 896 I wonder why you are setting the font anyway? Isn't this up to the browser?
0
11 years ago
Report Content
avatar
マイコー
Level: 292
Hmm - with some browsers, it'll actually tell you which on the declaration list is being used. Usually not, I don't think - font declarations are rather common, don't you think? Especially with Japanese fonts - some of them look so terrible, we were trying to settle on one that went well with the site. It might be easier to try and address this issue from a different direction - what part of the browser are you using to normally adjust the font, and we can try and figure out why that isn't working.
0
11 years ago
Report Content
avatar
shvelven
Level: 1
Changing the font in Firefox only affects the [i]default[/i] font---the font that is applied if the web page doesn't specify one. You can force it to apply your fonts by unchecking the "Allow pages to choose their own fonts..." checkbox: [url=http://i.imgur.com/ut5Z1om.png][img]http://i.imgur.com/ut5Z1om.png[/img][/url] That has the unfortunate side-effect of forcing every page on the entire internet to use your font. If you want to force a font only on Renshuu, install the [url=https://addons.mozilla.org/en-US/firefox/addon/stylish/]Stylish[/url] addon. Create a new user style by clicking "Stylish icon → Write new style... → Blank style..." and make it look like this (you can name it whatever you like): [url=http://i.imgur.com/sWlOWL3.png][img]http://i.imgur.com/sWlOWL3.png[/img][/url] Just copy-paste the following (replacing "Meiryo" with the name of the font you want to use): [code]@namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("renshuu.org") { body * { font-family: Meiryo; } }[/code] This still isn't a perfect solution, as this font will be used for [i]all[/i] text on Renshuu, not just Japanese characters. I don't think there's anything you can do to fix that, though.
0
11 years ago
Report Content
avatar
shvelven
Level: 1
Oh, I forgot to mention: To find the font used on a piece of text in firefox, 1) Press F12 to bring up the web developer tools and select the "Inspector" tab: [url=http://i.imgur.com/ze6InZF.png][img]http://i.imgur.com/ze6InZF.png[/img][/url] 2) Click the little arrow-pointing-at-a-box icon: [url=http://i.imgur.com/zxuGeua.png][img]http://i.imgur.com/zxuGeua.png[/img][/url] 3) Click the element with the font you want to look at (here, I'm clicking on the line of text which reads "Kanji characters"), and switch to the "fonts" tab on the right-hand pane: [url=http://i.imgur.com/4NrKKKN.png][img]http://i.imgur.com/4NrKKKN.png[/img][/url] You can see that Firefox is rendering that text in font face called "Meiryo Negrita", which is a system font (as opposed to a remote webfont).
0
11 years ago
Report Content
avatar
rtega
Level: 11
I know all of that. The thing is that with the previous version of renshuu I could just set the Japanese font to some nice written font and leave everything else as it was (keep the sans serif one for the normal romaji text). Now I'm stuck with using the japanese font for everything which is not what I want.
0
11 years ago
Report Content
avatar
rtega
Level: 11
I stylished myself out of it. So you can leave this problem as it is. I guess very few people will have the requirement that I have.
0
11 years ago
Report Content
avatar
shvelven
Level: 1
Sorry for assuming you didn't know about the Dev Tools. I only brought it up because マイコー asked which font Firefox was choosing for you and you responded with the font declaration instead of the specific font. My first thought is to suggest that you look at some of the better Japanese fonts such as Meiryo (Free if you copy from or symlink to a windows partition) or the [url=http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/index-en.html]M+ family[/url] (a free, open-source Japanese font. It even comes in two variants---[url=http://en.wikipedia.org/wiki/M%2B_Fonts#M.2B_OUTLINE_FONTS]Wikipedia[/url] does a good job explaining the differences). Both of those fonts were designed to look good with Japanese and Latin glyphs in the same sentence. But, if you absolutely hate that option, I have found a workaround for you. After some testing with a new user account from a fresh Firefox profile, I've found that if you set the font to one which doesn't support Japanese text, Firefox WILL fall back to your default Japanese font. I've tested this snippet on both versions of the site and it works the way you want it to: [code]@namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("renshuu.org") { body * { font-family: Arial; } }[/code] If you don't like Arial, pick something else as long as it doesn't have Japanese glyphs. EDIT: Ah---I see you posted while I was editing. I'll leave this up in case you find my solution helpful.
0
11 years ago
Report Content
Getting the posts




Top > renshuu.org > Bugs / Problems > Resolved Bugs


Loading the list
Lv.

Sorry, there was an error on renshuu! If it's OK, please describe what you were doing. This will help us fix the issue.

Characters to show:





Use your mouse or finger to write characters in the box.
■ Katakana ■ Hiragana