<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Many of the items below (meaning excluding the caret features and
app control of line spacing) are on my list of<br>
things to work on. <br>
<br>
phil<br>
<br>
<div class="moz-cite-prefix">On 1/26/23 12:33 PM, Scott Palmer
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAL3e5iFgVEETvsFb-PGzsNDFfNyO4bz_LsgB+sTwKqbm40tcaQ@mail.gmail.com">
<div dir="ltr">
<div>[dupe of private message, now including the mailing list]</div>
<div><br>
</div>
I've been using RichTextFX to make my own code editor/IDE. I
see that you have asked that project specifically on
GitHub, excellent.
<div>One thing that I wanted to do was to use a font like Fira
Code that combines characters such as != or >= into a
single glyph, but there are no APIs to request that JavaFX
render those optional ligatures. Swing APIs automatically do.
In fact just implementing some basic font selection has been
tedious. Getting the font family from a Font object and
trying to use it in CSS to specify -fx-font-family simply
doesn't work sometimes. Trying to filter the list of
available fonts to show only those that are fixed-width is
tedious. I tried to hack something by measuring a couple
different characters from the font that would normally be
different widths, but this is an unreliable hack. Allowing the
user to choose a preferred font and then
configuring components to use it via a CSS stylesheet is
simply more difficult than it should be.
<div>A few years ago I contributed the changes to make the
tab-width configurable, which helped with my project a
little bit. Other APIs are needed to better control line
spacing and measure font baseline offsets and that sort of
thing. I see there is an issue for caretBlinkRate, what
about changing the caret shape? E.g. block, underscore,
vertical bar, etc. Should the block be solid or an
outline? Why is caretShape read-only? Why does it return an
array of PathElements instead of simply a Shape which by
default would be a Path? More control of kerning and
general spacing might be nice. I've wanted that in the past,
not for a rich text control, but for doing video titles. I
can see how the two needs overlap though. I recently asked
here about rendering emojis. That's currently very
unreliable and broken. Getting something to work
consistently cross-platform is not easy. Sometimes emojis
are rendered in color, other times not. Mac renders color
emojis in gray and at the wrong size (since the sub-pixel
rendering was turned off to match macOS). On Windows the
emojis are never in color. </div>
</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
<div>Scott</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jan 25, 2023 at 10:41
PM Scott Palmer <<a href="mailto:swpalmer@gmail.com" moz-do-not-send="true" class="moz-txt-link-freetext">swpalmer@gmail.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div dir="ltr">I've been using RichTextFX to make my own code
editor/IDE. I see that you have asked that project
specifically on GitHub, excellent.
<div>One thing that I wanted to do was to use a font like
Fira Code that combines characters such as != or >=
into a single glyph, but there are no APIs to request that
JavaFX render those optional ligatures. Swing APIs
automatically do. In fact just implementing some basic
font selection has been tedious. Getting the font family
from a Font object and trying to use it in CSS to specify
-fx-font-family simply doesn't work sometimes. Trying to
filter the list of available fonts to show only those that
are fixed-width is tedious. I tried to hack something by
measuring a couple different characters from the font that
would normally be different widths, but this is an
unreliable hack. Allowing the user to choose a<span> preferred
font and then configuring components to use it via a CSS
stylesheet is simply more difficult than it should be.</span>
<div><span>A few years ago I contributed the changes to
make the tab-width configurable, which helped with my
project a little bit. Other APIs are needed to better
control line spacing and measure font baseline offsets
and that sort of thing. I see there is an issue for
caretBlinkRate, what about changing the caret shape?
E.g. block, underscore, vertical bar, etc. Should
the block be solid or an outline? Why is caretShape
read-only? Why does it return an array of PathElements
instead of simply a Shape which by default would be a
Path? More control of kerning and general spacing
might be nice. I've wanted that in the past, not for a
rich text control, but for doing video title. I can
see how the two needs overlap though. I recently
asked here about rendering emojis. That's currently
very unreliable and broken. Getting something to work
consistently cross-platform is not easy. Sometimes
emojis are rendered in color, other times not. Mac
renders color emojis in gray and at the wrong size
(since the sub-pixel rendering was turned off to
match macOS). On Windows the emojis are never in
color. </span></div>
</div>
<div><span><br>
</span></div>
<div><span>Regards,</span></div>
<div><span><br>
</span></div>
<div><span>Scott</span></div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jan 25, 2023 at
5:38 PM Andy Goryachev <<a href="mailto:andy.goryachev@oracle.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">andy.goryachev@oracle.com</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div>
<div lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-family:"Courier New"">Dear
colleagues:</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> </span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">I am
trying to identify missing public APIs needed to
support a rich text control. There is a number
of tickets created already against various parts
of JavaFX, collected in
<a href="https://bugs.openjdk.org/browse/JDK-8300569" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://bugs.openjdk.org/browse/JDK-8300569</a>
, though I suspect this list may not be
complete.</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> </span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">If
anyone has any suggestions or requests related
to the new APIs, I would be very interested to
learn the context, the reason these APIs are
needed, and whether a workaround exists.</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> </span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Thank
you in advance.</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> </span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">Cheers,</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New"">-andy</span></p>
<p class="MsoNormal"><span style="font-family:"Courier New""> </span></p>
</div>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>