1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
JUCE/modules
reuk 71bc141770 AttributedString: Fix faulty font lookup when rendering text
In particularly unfortunate cases, the fonts used for laying out and
drawing an AttributedString could end up differing, meaning that
incorrect glyph indices would be used during rendering. The rendered
text would end up using incorrect character symbols, making it
unreadable.

The problem seems to be:
- The AttributedString fetched a typeface during the getOrCreateFont
  call in createCFAttributedString.
- Details of the typeface (its style and name) were stored into the
  CFAttributedString.
- During `createLayout`, a new `Font` object was created using the
  stored typeface name and style.
- When calling `getTypeface` on this new font, during rendering,
  a different typeface was returned.

The fix implemented here stores the Font objects used during the
creating of the CFAttributedString, so that the fonts written to
the juce::AttributedString are guaranteed to match the fonts used
to compute the layout.
2021-07-05 12:21:36 +01:00
..
juce_analytics Update the minimum C++ standard to C++14 2021-06-24 16:09:48 +01:00
juce_audio_basics Update the minimum C++ standard to C++14 2021-06-24 16:09:48 +01:00
juce_audio_devices CoreAudio: Call AudioDeviceStop() on IO thread when stopping audio devices 2021-06-29 16:14:48 +01:00
juce_audio_formats BufferingAudioReader: Partially revert b3bdfdb3 to snap chunk start position to multiples of samplesPerBlock to fix stuttering MP3 playback on Windows 2021-06-25 14:44:35 +01:00
juce_audio_plugin_client Set the default value of JUCE_MODAL_LOOPS_PERMITTED to 0 2021-06-30 13:01:14 +01:00
juce_audio_processors AU Client: Fix AU plugins misreporting their supported channel configurations 2021-06-25 12:38:17 +01:00
juce_audio_utils Update the minimum C++ standard to C++14 2021-06-24 16:09:48 +01:00
juce_box2d Update the minimum C++ standard to C++14 2021-06-24 16:09:48 +01:00
juce_core Windows: Fix warnings when building with clang in 64-bit mode 2021-06-30 17:03:38 +01:00
juce_cryptography Update the minimum C++ standard to C++14 2021-06-24 16:09:48 +01:00
juce_data_structures Update the minimum C++ standard to C++14 2021-06-24 16:09:48 +01:00
juce_dsp AudioBlock: Remove unnecessary casts 2021-07-05 12:21:36 +01:00
juce_events Windows: Fix warnings when building with clang in 64-bit mode 2021-06-30 17:03:38 +01:00
juce_graphics AttributedString: Fix faulty font lookup when rendering text 2021-07-05 12:21:36 +01:00
juce_gui_basics NSViewComponentPeer: Avoid processing mouse events from tracking areas 2021-07-05 12:21:36 +01:00
juce_gui_extra NSViewComponent: Ensure NSView follows size of top-level component 2021-07-05 12:21:36 +01:00
juce_opengl OpenGL: Check at runtime whether non-power-of-two textures are supported 2021-07-05 12:21:36 +01:00
juce_osc Update the minimum C++ standard to C++14 2021-06-24 16:09:48 +01:00
juce_product_unlocking Update the minimum C++ standard to C++14 2021-06-24 16:09:48 +01:00
juce_video Update the minimum C++ standard to C++14 2021-06-24 16:09:48 +01:00
CMakeLists.txt BLOCKS: Remove juce_blocks_basics module 2021-05-19 16:53:01 +01:00