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

54 commits

Author SHA1 Message Date
attila
b72343cf8c Fix font sizing with the software and OpenGL renderers when ascent override is used 2025-10-24 11:22:15 +02:00
attila
39ff0f91f4 Docs: Add a note about ascent override to Font::getHeight() 2025-10-24 11:22:15 +02:00
Oliver James
d651f6740c Fonts: Add OpenType feature support 2025-06-17 12:38:20 +01:00
attila
724221081b Change the value returned by Font::getAscentInPoints and getDescentInPoints
Prior to this commit the returned values were always normalised to the
value returned by getHeightInPoints().
I.e. getAscentInPoints() + getDescentInPoints() would always equal
getHeightInPoints(), even if ascent or descent overrides were in place.

With this change in place getAscentInPoints() + getDescentInPoints()
will always equal
getHeightInPoints() * (getAscentOverride() + getDescentOverride())

JUCE classes don't use this value for layout logic, so this commit
causes no visible changes in how JUCE draws text.
2025-05-13 18:32:01 +02:00
reuk
a381fdf81d
Font: Allow overriding typeface ascent and descent metrics 2025-01-29 13:36:28 +00:00
reuk
29213e07a1
Font: Deprecate getStringWidth and getGlyphPositions 2024-09-18 19:13:09 +01:00
reuk
56d5445f8a
FontOptions: Make it easier to specify font sizes in points 2024-04-29 16:08:22 +01:00
reuk
c5a9e26960
Typeface: Add support for querying the default system UI typeface 2024-04-29 16:08:21 +01:00
reuk
c2fce879c5
Font: Allow switching between legacy non-portable metrics, and new portable metrics 2024-04-18 14:16:00 +01:00
reuk
4f2c287f9b
Font: Deprecate old Font constructors 2024-04-18 14:16:00 +01:00
reuk
2ed9b84070
Font: Add new FontOptions type 2024-04-18 14:16:00 +01:00
reuk
a1b23c0248
Font: Add support for querying fallbacks 2024-04-18 14:15:58 +01:00
reuk
0d2e34f34c
Typeface: Implement platform typefaces using Harfbuzz hb_font_t 2024-04-17 14:41:00 +01:00
Tom Poole
94d98a2b10 Update licensing information 2024-04-16 11:39:35 +01:00
reuk
8b8ae10059
Build: Replace JUCE_NODISCARD with [[nodiscard]] 2022-09-12 16:14:57 +01:00
Tom Poole
2ec861d99e Update licensing banners to JUCE 7 2022-05-16 17:55:48 +01:00
Tom Poole
68514d626c Graphics: Added a global GlyphArrangement cache 2022-04-04 12:36:33 +01:00
Tom Poole
dea3fe60e4 Update copyright banners 2022-04-04 12:36:32 +01:00
reuk
b80927fc91
Nodiscard: Add to builder-pattern functions 2022-01-27 18:43:21 +00:00
ed
b9542ccc4c Update code to use C++14 [[deprecated]] attribute
This commit removes the various compiler-specific JUCE_DEPRECATED macros and replaces them with C++14's deprecated attribute. It also removes the JUCE_CATCH_DEPRECATED_CODE_MISUSE flag as we can rely on the override specifier catching usage of these old virtual methods, and tidies up the DOXYGEN preprocessor checks as they were inconsistent across the codebase.
2021-09-29 16:14:00 +01: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
ed
a4d43c16e3 Added an underline toggle to FontsDemo 2020-08-04 10:26:41 +01:00
ed
009d685179 Updated all license headers 2020-06-29 08:30:22 +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
ed
a54da0b832 Fixed some more typos 2020-01-07 08:53:23 +00:00
ed
cdbc28c18b Add documentation tags 2018-03-15 12:10:32 +00:00
jules
970eda679e Added 'final' keyword to a lot of classes from which you really shouldn't be inheriting! 2017-10-09 12:38:06 +01:00
jules
3d7c777238 Some light modernisation of a bunch of old code 2017-10-04 12:47:43 +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
hogliux
2da1bc5f41 Replace include guards with "#pragma once" 2017-02-01 17:18:07 +00: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
hogliux
c7b8e77031 Update copyright notice 2015-07-22 15:59:34 +01:00
Timur Doumler
d46ea64aa5 LookAndFeel: added method to specify a custom font for Alert Window title. 2015-07-17 09:52:50 +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
171ef8dd4b Workarounds for AttributedString layout when using from-memory fonts on Windows. 2014-06-28 21:36:01 +01:00
jules
de6c80bb98 Clarified some documentation 2014-05-11 09:34:57 +01:00
jules
d28ebfdb36 Stripped out some unnecessary boilerplate includes from juce_graphics. 2013-08-24 10:49:25 +01:00
jules
5a1112ab94 Updated the format of the header include guard macros. 2013-07-17 16:26:35 +01:00
jules
c5f1e86cb3 Added some point-size accessor methods to Font. 2013-07-06 10:28:24 +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
2ae82c4db4 New method Font::withPointHeight, for specifying font sizes in points. 2012-12-17 21:27:23 +00:00
jules
0ceeb573d8 Minor changes to avoid pedantic compiler warnings. 2012-12-04 21:39:15 +00:00
jules
ed83df2d75 Fonts: fix for changing height of customised typefaces. 2012-10-05 17:24:03 +01:00
jules
fb5bcb5094 Removed a confusing Font constructor that took a style name but could be mistakenly called with a typeface name. 2012-07-14 12:48:01 +01:00
jules
b1d73f2086 Minor internal refactoring and clean-ups. 2012-07-14 10:02:45 +01:00
jules
b6211f01c8 Added method: Font::withTypefaceStyle(). 2012-07-03 14:39:00 +01:00
jules
7e9fbd30c3 Some font style tweaks, and update of the juce demo fonts page to show a list of available styles. 2012-05-02 11:12:31 +01:00
jules
941907a3d1 Initial commit of font style access, providing access to the styles available for each font family. 2012-05-01 12:10:05 +01:00