1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-29 02:40:05 +00:00
JUCE/modules/juce_graphics/fonts
attila d794fac44c SimpleShapedText: Fix line break behaviour with text trailing whitespaces
This fixes an issue with the text wrapping logic for text chunks ending
in a whitespace.

When trying to fit a text chunk, the logic works with two values: width
with trailing whitespace, and width without trailing whitespace.

When the trailingWhitespacesShouldFit option is false, the logic
checks if "withoutTrailingWhitespace" can still fit inside the remaining
width.

Prior to this fix, it then decremented the remaining width with
"withoutTrailingWhitespace", but it should have used
"withTrailingWhitespace" for the decrement operation, always, regardless
of the value of the withTrailingWhitespacesShouldFit option.

This mistake only caused an observable issue when multiple fonts were
used for the shaping operation, and a different font would be used
immediately after a whitespace falling at the end of a line.
2024-05-29 15:11:57 +02:00
..
harfbuzz Add Harfbuzz dependency 2024-04-17 14:41:00 +01:00
juce_AttributedString.cpp LowLevelGraphicsContext: Replace glyph drawing functions with single drawGlyphs() 2024-04-18 14:16:01 +01:00
juce_AttributedString.h Font: Deprecate old Font constructors 2024-04-18 14:16:00 +01:00
juce_Font.cpp Font: Fix result of getDescent(), which was incorrect when font height was set in points 2024-05-20 12:49:56 +01:00
juce_Font.h FontOptions: Make it easier to specify font sizes in points 2024-04-29 16:08:22 +01:00
juce_FontOptions.cpp FontOptions: Make it easier to specify font sizes in points 2024-04-29 16:08:22 +01:00
juce_FontOptions.h FontOptions: Make it easier to specify font sizes in points 2024-04-29 16:08:22 +01:00
juce_FunctionPointerDestructor.h juce_graphics: Add FunctionPointerDestructor utility 2024-04-17 14:41:00 +01:00
juce_GlyphArrangement.cpp GlyphArrangement: Fix incorrect positioning with Justification::top 2024-04-19 16:55:09 +02:00
juce_GlyphArrangement.h GlyphArrangement: Use ShapedText 2024-04-18 14:16:01 +01:00
juce_JustifiedText.cpp JustifiedText: Fix line spacing for multi-font text 2024-05-29 15:11:57 +02:00
juce_LruCache.h RenderingHelpers: Implement GlyphCache in terms of LruCache 2024-04-18 14:15:59 +01:00
juce_ShapedText.cpp Add ShapedText 2024-04-18 14:16:01 +01:00
juce_SimpleShapedText.cpp SimpleShapedText: Fix line break behaviour with text trailing whitespaces 2024-05-29 15:11:57 +02:00
juce_TextLayout.cpp LowLevelGraphicsContext: Replace glyph drawing functions with single drawGlyphs() 2024-04-18 14:16:01 +01:00
juce_TextLayout.h Font: Deprecate old Font constructors 2024-04-18 14:16:00 +01:00
juce_Typeface.cpp Typeface: Add getGlyphBounds 2024-04-18 14:16:01 +01:00
juce_Typeface.h FontOptions: Make it easier to specify font sizes in points 2024-04-29 16:08:22 +01:00
juce_TypefaceFileCache.h Typeface: Add support for querying system fallbacks 2024-04-17 14:41:01 +01:00
juce_TypefaceTestData.cpp Typeface: Implement platform typefaces using Harfbuzz hb_font_t 2024-04-17 14:41:00 +01:00