Bug 44451 - Multiple font family names, fallback fonts and font styles
Summary: Multiple font family names, fallback fonts and font styles
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: fonts (show other bugs)
Version: trunk
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-19 04:41 UTC by Justus-bulk
Modified: 2012-04-01 06:51 UTC (History)
0 users



Attachments
Patch as described in the bug report. (8.96 KB, patch)
2008-02-19 04:43 UTC, Justus-bulk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Justus-bulk 2008-02-19 04:41:44 UTC
The attached patch fixes two problems:

- If distinct fonts declare the same font family name, the resulting font
mapping is currently arbitrary; now, a name-similarity heuristic is used to
prioritize the font mappings.
- "Medium" and "demi" fonts are now recognized as "bold", solving several
real-world problems (although this solution may be an oversimplification).
Comment 1 Justus-bulk 2008-02-19 04:43:50 UTC
Created attachment 21558 [details]
Patch as described in the bug report.
Comment 2 Jeremias Maerki 2008-02-19 05:15:44 UTC
Patch applied with small modifications (under section 5 of the ALv2):
http://svn.apache.org/viewvc?rev=629093&view=rev

Thanks a lot, Justus!

Details on my refinements for font-weight:
I have fonts with medium, bold and extra bold weights. Setting medium and bold
to the same weight value seemed to simple. So at the moment, the mapping looks
like this:
light -> 200
default -> 400
medium -> 500
demi/semi(-bold) -> 600
bold -> 700
extrabold, extra bold, black, heavy, ultra, super -> 800
(the extra bold weights should probably be refined further although there's not
much playroom anymore.)
Comment 3 Glenn Adams 2012-04-01 06:51:20 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed