Browse Source

Windows: Fixed a DirectWrite justification bug

tags/2021-05-28
Tom Poole 5 years ago
parent
commit
008f097e12
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp

+ 2
- 0
modules/juce_graphics/native/juce_win32_DirectWriteTypeLayout.cpp View File

@@ -218,6 +218,7 @@ namespace DirectWriteTypeLayout
switch (text.getJustification().getOnlyHorizontalFlags())
{
case 0:
case Justification::left: break;
case Justification::right: alignment = DWRITE_TEXT_ALIGNMENT_TRAILING; break;
case Justification::horizontallyCentred: alignment = DWRITE_TEXT_ALIGNMENT_CENTER; break;
@@ -241,6 +242,7 @@ namespace DirectWriteTypeLayout
switch (text.getJustification().getOnlyHorizontalFlags())
{
case 0:
case Justification::left: alignment = DWRITE_TEXT_ALIGNMENT_TRAILING; break;
case Justification::right: alignment = DWRITE_TEXT_ALIGNMENT_LEADING; break;
default: break;


Loading…
Cancel
Save