6

I'm using the Open Sans web font from Google Web Fonts on my website. I only need the basic latin subset, but I do use the Psi (Ψ) character quite often as well and I would like to use the Open Sans version of that character, without having to include the entire greek subset.

I looked at this help page which shows how to embed specific characters only using the text parameter, but there's no mention of including specific characters. I tried doing the following to try to combine both font requests into one, but it didn't end up working.

<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700&subset=latin' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700&text=%CE%A8' rel='stylesheet' type='text/css'>

Is there anyway to accomplish this?

2
  • "without having to include the entire greek subset": Because of performance, or is there some other reason?
    – unor
    Commented Sep 12, 2013 at 14:00
  • performance, to make the request for the font file smaller
    – Steve
    Commented Sep 13, 2013 at 14:43

2 Answers 2

1

It looks like that you don't need to use the subset function as well, as it says on that page:

Note: there's no need to specify the subset= parameter when using text= as it allows you to refer to any character in the original font.

2
  • 1
    That's true, but using the text parameter only includes those specific characters of the font. Therefore, &subset=latin&text=%CE%A8 is the same as &text=%CE%A8
    – Steve
    Commented Jun 11, 2012 at 12:13
  • @S.K. Do you mean isn't the same? Commented Feb 14, 2013 at 9:43
1

I have had problems with subsets of Google fonts in different browsers (I suspect the & vs. &amp; is the culprit) but if you don't need (or can accept not using) the Psi character in 400, 400italic, and 700, you could try removing that requirement from you request and see if it helps.

Also, in a recent Google HTML/CSS styleguide they advocate omitting character references and using the actual character--even in code--unless it carries a special meaning in HTML (like 'greater than' and 'less than' symbols).

1
  • On my own site, what I ended up doing was loading the critical text immediately and then loading the full font library asychronously with Modernizr. I figure that way my pages load quickly but all characters are available for translations.
    – adam-asdf
    Commented Aug 10, 2013 at 14:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.