Bug 61331 - Font group handling / common font interface
Summary: Font group handling / common font interface
Alias: None
Product: POI
Classification: Unclassified
Component: SL Common (show other bugs)
Version: 3.17-dev
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2017-07-23 22:33 UTC by Andreas Beeker
Modified: 2017-07-23 22:47 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Beeker 2017-07-23 22:33:47 UTC
The font handling in office documents are based on the LOGFONT structure [1].
I've added a common interface for fonts in org.apache.poi.common.usermodel.fonts, which I eventually also want to apply to X/HSSF - but currently use it only for X/HSLF and HWMF.

Additionally this patch focus on the font group handling in X/HSLF - Powerpoint chooses from a set of 3-4 fonts depending on the used charset [2]

When running the tests, I've noticed that CJK symbols were rendered in Java 8, but not in Java 6, when there wasn't a POI-specific fallback font set. Up till now, I haven't found out why, but I suspect a difference in the fontconfig fallback [3] ... which (difference) I couldn't point out either :(

And as a last change, FontInfo is now returned on methods which returned an index.

[1] https://msdn.microsoft.com/en-us/library/dd145037.aspx
[2] https://blogs.msdn.microsoft.com/officeinteroperability/2013/04/22/office-open-xml-themes-schemes-and-fonts/
[3] https://docs.oracle.com/javase/6/docs/technotes/guides/intl/fontconfig.html
Comment 1 Andreas Beeker 2017-07-23 22:47:05 UTC
Applied with r1802741