attila
b545b79cb3
GlyphArrangement: Make drawFittedText squashing behaviour more similar to JUCE 7
...
This commit fixes a regression added during the ShapedText based rewrite
of the class. The minimumHorizontalScale parameter was mistakenly
interpreted as an absolute scale, whereas its meaning in the old
implementation was a relative scalar applied to the Font's horizontal
scale.
2024-10-21 15:34:42 +02:00
attila
5e4016b4fb
GlyphArrangement::addFittedText: Break words across multiple lines if necessary
...
This behaviour, previously available in JUCE 7, was missing since the
JUCE 8 changes related to Unicode text drawing.
With this commit, words that are too long to fit in a line are again
broken up, with the caveat, that we can expect this approach to produce
quirks with bidirectional text. We don't expect that such a feature
could be satisfactorily provided for bidirectional text, so this is a
stopgap measure for legacy applications.
2024-09-19 15:35:53 +02:00
attila
7cbdd14da9
GlyphArrangement::addFittedText: Fix scaling and squashing behaviour
2024-09-19 15:35:53 +02:00
Anthony Nicholls
1dd2b3c90e
Formatting: Whitespace
2024-09-06 15:40:39 +00:00
reuk
66a29f9762
GlyphArrangement: Avoid divide-by-zero in addFittedText
2024-05-31 11:43:29 +01:00
attila
0d93e15d50
GlyphArrangement: Fix incorrect positioning with Justification::top
2024-04-19 16:55:09 +02:00
attila
20afcb5bf3
GlyphArrangement: Use ShapedText
2024-04-18 14:16:01 +01:00
reuk
1560f87111
LowLevelGraphicsContext: Replace glyph drawing functions with single drawGlyphs()
2024-04-18 14:16:01 +01:00
reuk
c2fce879c5
Font: Allow switching between legacy non-portable metrics, and new portable metrics
2024-04-18 14:16:00 +01:00
Tom Poole
94d98a2b10
Update licensing information
2024-04-16 11:39:35 +01:00
Tom Poole
4153d59e39
Formatting
2023-10-02 15:42:20 +01:00
reuk
28414a6af8
Global: Avoid floating-point equality checks where possible
2023-04-04 19:55:11 +01:00
Tom Poole
2ec861d99e
Update licensing banners to JUCE 7
2022-05-16 17:55:48 +01:00
Tom Poole
dea3fe60e4
Update copyright banners
2022-04-04 12:36:32 +01:00
reuk
6a1a96247b
GlyphArrangement: Avoid breaking on non-breaking spaces
2022-01-28 16:09:59 +00:00
reuk
3768349a05
Font: Make Font and TypefaceCache threadsafe
...
Previously, it wasn't safe to access Font instances from multiple
threads because there was a chance that they might reference the same
shared internal state. In this case, calling getTypeface() or getAscent from
two threads simultaneously would cause a race on the typeface and ascent
data members, even though the Font instances appeared to be disjoint.
With this change in place, it is now safe to use Font instances from
multiple threads simultaneously.
It is still an error to modify the same Font instance from multiple
threads without synchronization!
// Fine:
Font a;
Font b = a;
auto futureA = std::async (std::launch::async, [&a] { /* do something with a */ });
auto futureB = std::async (std::launch::async, [&b] { /* do something with b */ });
// Bad idea:
Font f;
auto futureA = std::async (std::launch::async, [&f] { /* do something with f */ });
auto futureB = std::async (std::launch::async, [&f] { /* do something with f */ });
2021-09-23 10:28:47 +01:00
reuk
394c4fd475
Clang: Fix warnings when building with clang 10
2020-07-01 10:00:43 +01:00
ed
009d685179
Updated all license headers
2020-06-29 08:30:22 +01:00
reuk
4cf66d6522
Cleanup: Remove redundant inlines
2020-04-27 10:22:06 +01:00
Tom Poole
894e7d2bd2
Updated all license headers
2020-04-23 17:30:39 +01:00
reuk
327f817b9b
Copyrights: Update commercial/gpl headers to be gpl-only
2020-04-09 15:22:56 +01:00
Tom Poole
47f138464f
macOS: Fixed a CoreGraphics text layout bug
2020-01-17 16:34:50 +00:00
Tom Poole
79d3e8b3f5
Windows: Removed some VS2013 workarounds
2019-07-11 15:28:41 +01:00
ed
06da4f2daf
Added a font 'leading' parameter for multiline text layouts
2019-03-11 16:43:21 +00:00
ed
eaf0f990d4
Replaced all uses of static_cast<Type&&> with std::move
2018-11-28 17:29:20 +00:00
Tom Poole
cff37f5b6a
Fixed some const violation errors
2017-12-19 12:44:24 +00:00
tpoole
51b3eaebb2
Fixed some VS2013 compiler errors
2017-10-18 11:05:40 +01:00
jules
5c854b49a8
Fixed a problem in GlyphArrangement which could cause multiple lines to all be given ellipsis
2017-10-16 17:50:48 +01:00
jules
eda613c6db
Moved all "namespace juce" declarations from module headers to the individual .h and .cpp source files. This makes life a lot easier for Intellisense and other IDE autocompletion tools
2017-09-08 08:59:55 +01:00
hogliux
b5afccc37c
Updated file headers and the README with the JUCE 5 license
2017-04-27 14:43:04 +01:00
jules
89ad7eb0a4
Modernised some code in some text layout classes, and made TextLayout draw underlining where the font asks for it
2017-04-06 10:55:48 +01:00
hogliux
9f3fb1c0a6
Added a compiler error if your compiler is too old and removed numerous code checks for old compilers which are now deprecated
2017-02-01 17:18:06 +00:00
jules
7a27686d96
Fix for a layout truncation problem in GlyphArrangement when splitting across many lines.
2015-09-28 17:12:37 +01:00
hogliux
c7b8e77031
Update copyright notice
2015-07-22 15:59:34 +01:00
jules
844d9e8d86
Added method Font::getDefaultMinimumHorizontalScaleFactor() to make it possible to change the global minimum font squashing amount.
2015-03-17 11:41:14 +00:00
jules
94a0793a09
Prevented drawFittedText from messing up the graphics context's current font.
2015-02-02 13:00:48 +00:00
jules
36e7c12504
Fix for some VC compiler warnings.
2014-07-01 18:50:42 +01:00
jules
02460bb95b
A bit of refactoring inside GlyphArrangement, to avoid som edge-cases where the wrong number of lines is chosen.
2014-06-29 14:34:26 +01:00
jules
45b56e2e20
Minor clean-ups around the Justification class.
2013-08-20 17:27:41 +01:00
jules
03c2801f3f
Copyright header update in all module files. juce_core modules are now ISC licensed. All other modules are GPLv2/3/AGPLv3
2013-06-13 13:17:12 +01:00
jules
ccc89aaae9
Minor tidying-up.
2012-12-20 20:46:17 +00:00
jules
6846b71ea4
Minor tweak to the GlyphArrangement word-splitting algorithm.
2012-12-20 13:59:51 +00:00
jules
4ef89c890f
Avoided a few gcc compiler warnings.
2012-11-11 18:43:36 +00:00
jules
b1d73f2086
Minor internal refactoring and clean-ups.
2012-07-14 10:02:45 +01:00
jules
56bbab1537
(automated whitespace clean-up)
2012-03-20 16:00:06 +00:00
jules
295d125142
Stopped using the old BEGIN_JUCE_NAMESPACE macros, and just used hard-coded namespaces where necessary instead. The macro definitions are still there, so this shouldn't affect anyone's code.
2012-02-11 14:09:23 +00:00
Julian Storer
b70e0a28d2
First check-in of the "jucequake": a major re-organisation of the library to break it up into modules. For more details about this, see the website forum..
2011-08-12 10:04:52 +01:00