You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by "plutext (via GitHub)" <gi...@apache.org> on 2026/10/06 23:20:11 UTC

[PR] FOP-3356: simulate-style does not slant an italic face or stroke a bold one, and strokes at 1/35 em [xmlgraphics-fop]

plutext opened a new pull request, #125:
URL: https://github.com/apache/xmlgraphics-fop/pull/125

   Fixes [FOP-3356](https://issues.apache.org/jira/browse/FOP-3356).
   
   `PDFPainter.startSimulateStyle` synthesised a style from the font entry's `simulate-style` flag and the triplet
   alone: a bold triplet was stroked with a fixed 0.31543pt line and an italic one sheared by 0.3333, whatever the
   face. So an italic face registered for a bold italic triplet was slanted a second time, a bold face registered
   for a bold italic one was stroked again, and the stroke, right at about 11pt, was too light at larger sizes and
   too heavy at smaller ones.
   
   **The change.** In `startSimulateStyle` and `endSimulateStyle`, used by both `drawTextWithDX` and
   `drawTextWithDP`:
   - an italic triplet is sheared only where the face's italic angle (`CustomFont.getItalicAngle()`, from the post
     table) is 0;
   - a bold triplet is stroked only where the face's weight class (`CustomFont.getWeight()`, from OS/2) is below
     700; an unknown weight, 0, counts as not bold, as before;
   - the stroke is the font size / 35, which is what Word draws for a synthetic bold at every size; at 11.04pt it
     is the former 0.31543.
   
   Only the painted glyphs change, never layout.
   
   **Test.** `PDFPainterTestCase`: an italic face not sheared, a bold face not stroked, and the stroke at 22.08pt
   (0.63086); each fails without the change. The two existing simulate-style tests now run at 11.04pt, where the
   stroke is the former constant. With the change, the fop-core suite passes, 3679 tests and 0 failures, and
   checkstyle reports 0 violations.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Re: [PR] FOP-3356: simulate-style does not slant an italic face or stroke a bold one, and strokes at 1/35 em [xmlgraphics-fop]

Posted by "plutext (via GitHub)" <gi...@apache.org>.
plutext commented on PR #125:
URL: https://github.com/apache/xmlgraphics-fop/pull/125#issuecomment-6180364415

   Closing: applied to main as c2d7e0aca (2026-10-07), FOP-3356 resolved Fixed for 2.12. Thank you.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Re: [PR] FOP-3356: simulate-style does not slant an italic face or stroke a bold one, and strokes at 1/35 em [xmlgraphics-fop]

Posted by "plutext (via GitHub)" <gi...@apache.org>.
plutext closed pull request #125: FOP-3356: simulate-style does not slant an italic face or stroke a bold one, and strokes at 1/35 em
URL: https://github.com/apache/xmlgraphics-fop/pull/125


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org