<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hello, Andy. Thank you for your reply.<br>
<br>
I'm working on a project that uses two CodeAreas—one from the
RichTextFX project and one from JFX. <br>
I can't provide more details yet, but I promise to share a link once
it's ready :)<br>
<br>
However, this isn't really the main point. There are two ways to
handle styling—via CSS and via code. CSS styling <br>
is always more convenient and preferable since it's an established
standard. For example, since my project <br>
involves two CodeAreas, I need to unify their styling approach
(using style classes).<br>
<br>
Just imagine—for the RTFX CodeArea, a user can use classic CSS, but
for the JFX CodeArea, they'd have to come <br>
up with some non-standard approach that would break the whole
architecture, relying on workarounds.<br>
<br>
That's why I suggest to add wavy underline support to JFX CodeArea.
Compare:<br>
<br>
Web CSS: text-decoration-style: wavy;<br>
RTFX CSS: -rtfx-underline-wave-radius: <size>;<br>
JFX CSS: It’s not that simple<br>
<br>
Best regards, Pavel<br>
<br>
<div class="moz-cite-prefix">On 4/28/25 18:36, Andy Goryachev wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BYAPR10MB3013E230A1C0C726AB89DA38E5812@BYAPR10MB3013.namprd10.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}@font-face
{font-family:"Iosevka Fixed SS16";
panose-1:2 0 5 9 3 0 0 0 0 4;}@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:10.0pt;
font-family:"Aptos",sans-serif;}span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Iosevka Fixed SS16";
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}div.WordSection1
{page:WordSection1;}</style>
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">An
interesting question.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Currently,
the shape for a wavy underline is created programmatically,
see HighlightShape::generateSquiggly(). It is unclear how
to enable CSS styling - for example, the model may decide to
provide more than one color. It is also unclear how to
generate the necessary path via CSS (it is currently a Path
with a sawtooth line segments generated from the underline
shape provided by the text layout).<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">If
you are satisfied with the wavy line shape itself and just
want to set the color via CSS - that should be easy (you
just identified a missing API - there is
RichParagraph.Builder.addWavyUnderline(int start, int end,
Color color), but not
RichParagraph.Builder.addWavyUnderline(int start, int end,
String ... styles).<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">And
we have a similar situation with the similar method
RichParagraph.Builder.addHighlight().<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">Could
you describe your use case in more detail please?<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16"">-andy<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Iosevka Fixed SS16""><o:p> </o:p></span></p>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div
style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span
style="font-size:12.0pt;color:black">From:
</span></b><span
style="font-size:12.0pt;color:black">openjfx-dev
<a class="moz-txt-link-rfc2396E" href="mailto:openjfx-dev-retn@openjdk.org"><openjfx-dev-retn@openjdk.org></a> on behalf of
PavelTurk <a class="moz-txt-link-rfc2396E" href="mailto:pavelturk2000@gmail.com"><pavelturk2000@gmail.com></a><br>
<b>Date: </b>Sunday, April 27, 2025 at 11:27<br>
<b>To: </b><a class="moz-txt-link-abbreviated" href="mailto:openjfx-dev@openjdk.org">openjfx-dev@openjdk.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:openjfx-dev@openjdk.org"><openjfx-dev@openjdk.org></a><br>
<b>Subject: </b>RichTextArea: how to set wavy
underline using CSS?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">RichParagraph.Builder
has public RichParagraph.Builder
addWavyUnderline(int start, int length, Color color)
method.<br>
<br>
However, I can't find a way how to make a wavy
underline via CSS. It is very important for me
because I want to make all styling via CSS -<br>
I don't want to make users use different mechanisms
for styling (CSS, code).<br>
<br>
Fox example, RichTextFX contains the following
rules:<br>
<br>
/* the color of the underline */<br>
-rtfx-underline-color: <paint>;<br>
<br>
/* the radius used to create waved underline */<br>
-rtfx-underline-wave-radius: <size>;<br>
<br>
Could anyone say how to do it in JFX RichTextArea?<br>
<br>
Best regards, Pavel<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>