Review Request: Exact ms-word font height

Matus Hanzes matus.hanzes at ixonos.com
Tue Mar 22 11:40:18 GMT 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100915/
-----------------------------------------------------------

(Updated March 22, 2011, 11:40 a.m.)


Review request for Calligra, Thorsten Zachmann and Casper Boemann.


Changes
-------

Wrong diff


Summary
-------

Problem with fonts in linux and windows is that true type fonts have more than one metric.
They have normal metric placed in font header table
          microsoft metric placed in os2 table
          apple metric placed in os2 table
   
Ms-word is probably using CreateFontIndirect and GetOutlineTextMetric function to calculate line height and this functions are using windows gdi environment which is using microsoft font metric placed in os2 table.
Qt on linux is using normal font metric.

This two metrics are different and change from font to font.

If caligra words on linux wants to have the same line height as ms-word, font stretch constant has to be calculated and used in text shape.

This is the equation which is used in text shape:
font_size * font_stretch = windows_font_height

Any comments are welcome


Diffs (updated)
-----

  CMakeLists.txt 7c94026 
  libs/kotext/CMakeLists.txt 837d748 
  libs/kotext/styles/KoCharacterStyle.h 3cec793 
  libs/kotext/styles/KoCharacterStyle.cpp 6eaab0f 
  plugins/textshape/TextShapeLayout.cpp ea49dc4 

Diff: http://git.reviewboard.kde.org/r/100915/diff


Testing
-------


Thanks,

Matus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20110322/f9e842d5/attachment.htm>


More information about the calligra-devel mailing list