On 20-02-2020 10:02, Mark Rotteveel wrote:
I built an equivalent for ttcmetrics so I could fix the issue with the Japanese rendering. I ran into problems with doing it from Ant (probably due to Java version mismatches) and decided it was easier to just do it from Gradle than spend time investigating exactly why Ant misbehaved. I will add equivalent tasks for TTF and T1 this weekend.

I have committed changes for tasks to generate font metrics and updated the Japanese font-metrics.

As an example:

gradlew ttfMetrics --fontFile=C:\Windows\Fonts\msgothic.ttc --ttcName="MS Gothic" --fontName="MSGothic" --metricsFileName=msgothic.xml

However, in the fop-userconfig.xml, there is a comment that says:

"""
Make sure msmincho.xml contains no entry for unicode 8203
(zero-width space), or the layout will go wrong for text
containing that character.
Whenever you generate a new msmincho.xml, see if it contains
this element:
  <bf us="8192" ue="8213" gi="753"/>
or something similar with us <= 8203 <= ue.
If you find such an element, cut out 8203 by replacing the
element with two ranges, in this case:
  <bf us="8192" ue="8202" gi="753"/><bf us="8204" ue="8213" gi="765"/>
Note that the first element keeps the original value for gi.
The gi of the second element is calculated as follows:
  gi(2) = gi(1) + us(2) - us(1)
"""

After some experimentation, I didn't removed the 8203 character, as I didn't see anything wrong with rendering, but it might be easy to miss. Any idea what I should be looking for?

In addition, the formula to derive the gi seems to be wrong. As far as I can tell from the steps between earlier entries, gi is a running count of the numbers of characters, and the actual formula should be

gi(2) = gi(1) + 1 + ue(1) - us(1)

Which would also suggest that you can't go around and just excise characters without introducing off-by-n errors for later entries.

Given the fact Japanese hasn't been kept up-to-date for some time (and for example the release notes only build by commenting out things), is it really worthwhile to invest more time in trying to get this 'right'? Or could this be something that we can leave until a new Japanese document needs to be released?

Mark
--
Mark Rotteveel


_______________________________________________
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs

Reply via email to