Review Request: Exact ms-word font height

Casper Boemann cbr at boemann.dk
Tue Mar 22 11:56:41 GMT 2011


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

Ship it!


Hi It looks quite nice

Please port it to the text-layoutrestructure-boemann branch at the same time as you push it to master.

- Casper


On March 22, 2011, 11:40 a.m., Matus Hanzes wrote:
> 
> -----------------------------------------------------------
> 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.
> 
> 
> 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
> -----
> 
>   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/bca7a4fd/attachment.htm>


More information about the calligra-devel mailing list