Skip to content

Commit

Permalink
Do not assume A_ITALIC is available.
Browse files Browse the repository at this point in the history
Some older versions of macOS's command line tools SDK do not have it, for example.
  • Loading branch information
orbitalquark committed Oct 18, 2024
1 parent 566097a commit 60e3299
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PlatCurses.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ namespace Scintilla::Internal {

FontImpl::FontImpl(const FontParameters &fp) {
if (fp.weight == FontWeight::Bold) attrs = A_BOLD;
#if defined(A_ITALIC)
if (fp.italic) attrs |= A_ITALIC;
#endif
if (static_cast<int>(fp.stretch) == A_UNDERLINE) attrs |= A_UNDERLINE;
}

Expand Down

0 comments on commit 60e3299

Please sign in to comment.