Comment 6 for bug 1364937

Revision history for this message
Tavmjong Bah (tavmjong-free) wrote :

Wasn't finished with comment above...

I cleaned up the code a bit. Might or might not help... simplifying the conversion of Pango weight values to CSS weight values.

Some notes:

With Pango 1.36.1:

  Source Sans Pro (six weights):

    Works as expected in trunk and experimental branch.

  Source Han Sans (seven weights):

    Installed via Fedora 20 RPM (adobe-source-han-sans-cn-fonts-1.000-4.fc20.noarch):

      Pango maps both medium and regular to CSS medium weight.
      Trunk specifically skips duplicate CSS weights thus only six weight shown.
      Experimental shows seven but only renders six (as expected since SVG stores weights using CSS).

    Installed via downloading source (http://sourceforge.net/adobe/source-han-sans/wiki/Home/):

      Pango maps both extralight and light to light, regular and medium to medium.
      Trunks shows five weights, experimental seven.

I commented in another bug that Pango uses the PS Weight value in determining weights but this seems to not be true in the case of Source Han Sans where the PS Weight value for all faces is set to Regular (FontForge: Element->Font Info...->PS Names->Weight). The PS Weight values are "correct" in Source Sans Pro.

Looks like I'll have to install Pango 1.36.6 to make any more progress...