views:

80

answers:

1

Assuming all the required fonts are available on client's machine.

  1. Probably, you all could see following 'stackoverflow' word written in Indic Language script : 'स्टैकओवरफ्लो' . A quick lookup using Web Developers Tools tells that this word is written using 'Arial, Liberation Sans..' font family. Does that mean Arial font supports Indic language scripts? Is it really Arial font?

  2. I want to display all such strings in another unicode font installed on machine. How could I convert it using javascript? My understanding is, since there is no direct 1-1 mapping between these unicode fonts, some kind of conversion might be required.

  3. How can I map a unicode font to normal 101 keys US keyboard? So that typing 'stackoverflow' would get converted into 'स्टैकओवरफ्लो' if proper font is selected. It seems using some tools, this is possible. Is this the normal approach? Are there any alternatives?

EDIT1 This and this resource seem to be helpful.

EDIT2 Suppose a particular unicode string could be written in Font A as a combination of ALT+0234, ALT+0244, ALT+0221 on numpad. In Font B, same string would be written via different combination like ALT+0212, ALT+0223, ALT+0242. So how could I do this conversion?

EDIT3 Please see this image for more clarification. See last 2 strings in brackets. Those are the strings I want to convert to and from. Those 2 strings render same Indic string in 2 different fonts.

+3  A: 
  1. Most modern layout engines have the capability to substitute other fonts if the main font doesn't have a glyph for the current character. This is probably what you're seeing.

  2. It's exactly the same text in both fonts; the only issue is that not all fonts may have glyphs for all characters, so they will be unable to display the text properly.

  3. You need to use an Input Method Editor in order to enter non-Roman text with a Roman keyboard; see your OS documentation for details.

Ignacio Vazquez-Abrams
@Ignacio: regarding answer to 1, if glyphs are missing, then would layout engine search for missing glyph in all installed fonts and use the first one found? What would be the logic? How could I know the exact font used, if it is replaced by engine?
understack
Depends on the engine. Under GNOME you can use Character Map to determine what fontconfig has decided to use. Dunno about Uniscribe (Windows) or Core Text (OS X) though.
Ignacio Vazquez-Abrams
@Ignacio: PLease see my edit3 above. I think my question should be more clear now.
understack
My answer remains. If you have fonts that don't follow the Unicode codepoints then there's nothing that can be done about it.
Ignacio Vazquez-Abrams
@Ignacio: Could you please tell me the steps for 'Character Map to determine what fontconfig has decided to use' in Ubuntu?
understack
Pick the font you want to use as a base from the pulldown, then right-click-hold over the character. The name of the font used will be in the bottom of the small window that pops up.
Ignacio Vazquez-Abrams