How to spec custom Devanagari font in Chrome and enable OT features?

paul d hunt's picture

Hi. So I'm trying to change the default Devanagari font in chrome by specifying Adobe Devanagari as the default font in chrome. So my CSS code I have is:

@font-face {
font-family: sans-serif;
src: local("AdobeDevanagari-Regular");
unicode-range: U+900-97F;
}

Now this will work to swap out the family, but then the OpenType features do not work. Is there anyway to get Chrome to apply the Indic OT features from the font?

paul d hunt's picture

I should note that I’m asking about Chrome on Mac (Snow Leopard 10.6.8), according to http://www.w3.org/TR/css3-fonts/ it states that:

Rendering complex scripts that use contextual shaping such as Thai, Arabic and Devanagari requires features present only in OpenType or AAT fonts. Currently, complex script rendering is supported on Windows and Linux using OpenType font features while AAT font features are used under Mac OS X. Apple has indicated it intends to support complex script rendering using OpenType font features in the future.

It seems that to get the functionality I want, I might need to actually upgrade to Lion or Mountain Lion. :^(

jasonc's picture

(tracking this... cause I think you're right that the OT features don't work in Chrome on Mac)

Thomas Phinney's picture

Recent Mac OS supports OpenType for Arabic and (old 'deva') Devanagari shaping. I expect Thai as well.

Agreed that Snow Leopard (10.6) may not be recent enough for all of this.

frankrolf's picture

I just tested this; it seems to work in Mountain Lion.
I am using Chromium 24.0.1312.57 (178923) on OS 10.8.2, and managed to substitute the default Devanagari font with Adobe Devanagari. OT features work.
Paul is happy.

Thomas Phinney's picture

This issue of shaping engine support actually helped push me to upgrade to Mountain Lion (done earlier today).

Syndicate content Syndicate content