1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
Commit graph

20 commits

Author SHA1 Message Date
reuk
de4696d891
SimpleShapedText: Reorganise function declarations 2025-10-20 17:34:48 +01:00
Anthony Nicholls
5b0a2b9b80 Font: Cache HarfBuzz fonts and font details 2025-09-25 14:56:34 +01:00
Anthony Nicholls
c0f164ee28 Text: Cache the display language 2025-09-25 14:56:34 +01:00
reuk
22d5d7a598
SimpleShapedText: Fix potential heap buffer overflow 2025-07-03 16:15:03 +01:00
Oliver James
d651f6740c Fonts: Add OpenType feature support 2025-06-17 12:38:20 +01:00
reuk
fa701a1bd9
SimpleShapedText: Use string with replaced whitspace during fallback font substitution
This is intended to address an assertion that sometimes fired during
shaping text on Android, for example when using the font "Noto Sans
Symbols" and shaping ASCII text including a line break in a multiline
text editor.

The cause of the issue seems to be that the shaper would search for
substitute fonts using the original string content, but would then
replace some characters in the string during shaping. Shaping could then
fail if the font did not contain glyphs for the replaced characters.

We now create a UTF32 string with replaced characters at the beginning
of the shaping process, and use that new string for all queries other
than unicode analysis.
2025-06-16 16:59:55 +01:00
reuk
e5049ad6e9
SimpleShapedText: Avoid UTF8-lookup allocations 2025-06-16 16:59:55 +01:00
attila
0e4287df52 ShapedTextOptions: Rename maxWidth to wordWrapWidth
The old name didn't communicate it clearly enough what the parameter was
used for. This started to show when alignmentWidth was added.
2025-05-21 17:47:20 +02:00
attila
69b2b3ff5d Remove unused internal bidi features
This commit removes the possibility to construct BidiParagraph and
BidiLine objects with non-zero offsets. We don't use these features,
and the assumption that these offsets are always zero simplifies our
visual ordering algorithm.
2025-05-12 16:49:05 +02:00
attila
10b6289295 SimpleShapedText: Fix overallocating s32 buffer
Prior to this commit we overallocated the s32 buffer. The buffer was
unnecessarily padded by zeros, and the line stating this, wasn't
actually dropping the null terminator.
2025-05-12 16:49:05 +02:00
attila
9c0aeb9e00 ShapedText: Fix potential crash caused by invalid Unicode strings
This change also fixes bad access that could happen with \r\n
line terminators. An incorrectly sized buffer meant that \n was
clobbered by the null terminator.
2025-04-02 15:33:27 +02:00
attila
bdc515e424 ShapedText: Fix crash caused by failing to find a fallback font for all codepoints 2025-04-02 15:33:27 +02:00
attila
432a7e1c9a Fix C++20 compilation 2025-03-14 10:03:11 +01:00
attila
427852836c ShapedText: Break ligatures into multiple iterable placeholder glyphs 2025-03-13 12:16:16 +01:00
attila
bc093fa64c Ranges: ShapedText: Use out params for improving TextEditor performance 2025-03-13 12:16:16 +01:00
attila
a4f73a37af ShapedText: Fix input text range calculation logic during wrapping 2025-03-13 12:16:16 +01:00
attila
d72df5faa3 ShapedText: Add bidirectional lookup functions relating positions, input indices and glyph indices 2025-03-13 12:16:16 +01:00
attila
2d24504cd1 Change the return type of RangedValues::getIntersectionsWith
This is to avoid converting the returned value to RangedValues at the
call site.
2025-03-13 12:16:16 +01:00
attila
ef840b7472 Use detail::RangedValues<Font> on ShapedText related interfaces
Previously using the FontForRange type was motivated by hiding the
RangedValues type in case we wanted to expose the ShapedText API. This
introduced unnecessary conversions between FontForRange and
RangedValues<Font>.
2025-03-13 12:16:16 +01:00
attila
1b595311d0 Move ShapedText to the detail namespace and expose it in the headers
This makes it accessible for the new TextEditor implementation in
juce_gui_basics.
2025-03-13 12:16:16 +01:00
Renamed from modules/juce_graphics/fonts/juce_SimpleShapedText.cpp (Browse further)