On Fri, 13 Nov 2026 17:47:05 GMT, Andy Goryachev <[email protected]> wrote:
>> Fixes exporting of the `CodeArea` font to RTF and HTML. >> >> Only the font family and size gets exported. The font weight is not, mainly >> for simplicity (the custom models can be better), but also because there is >> no public API to get the font weight from the `Font` class. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Andy Goryachev has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains six additional > commits since the last revision: > > - getter > - Merge branch 'master' into 8396861.codearea.font > - diff > - cleanup > - html too > - code area font Thanks for the fix (font is Jetbrains Mono) Tested on macOS, RTF works: <img width="1008" height="753" alt="grafik" src="https://github.com/user-attachments/assets/430d1ee3-2838-4717-81b8-eec828beb6fe" /> Tested with LibreOffice, HTML: <img width="831" height="579" alt="grafik" src="https://github.com/user-attachments/assets/4d1422b6-3d1e-45c3-9840-da346994dec9" /> HTML also keeps the monospaced font; however, it adds spacing between. As a workaround, we currently wrap the whole source in `<pre>` when copying. Not sure if you want to address this here or what's your opinion is on this. ------------- PR Comment: https://git.openjdk.org/jfx/pull/2369#issuecomment-6927352668
