Skip to content

Fix font pages not being created with the desired smoothness#2072

Merged
eXpl0it3r merged 1 commit into
SFML:2.6.xfrom
kimci86:bugfix/font_smooth
Apr 21, 2022
Merged

Fix font pages not being created with the desired smoothness#2072
eXpl0it3r merged 1 commit into
SFML:2.6.xfrom
kimci86:bugfix/font_smooth

Conversation

@kimci86

@kimci86 kimci86 commented Apr 12, 2022

Copy link
Copy Markdown
Contributor

Description

This is an alternative solution for the issue described in #2064
As try_emplace is not available with C++03, extra Page copies occur, but at most once per character size and per font.

Besides, Page not having a default constructor anymore implies it is not possible to use operator[] on m_pages, which is a good thing to force that the desired smoothness is always used to initialize new glyph pages.

For reference, smoothing for fonts was first added in #1690.

Tasks

  • Tested on Linux
  • Tested on Windows
  • Tested on macOS
  • Tested on iOS
  • Tested on Android

How to test this PR?

An example is provided in the original PR #2064

Comment thread include/SFML/Graphics/Font.hpp Outdated
Comment thread src/SFML/Graphics/Font.cpp Outdated
@kimci86 kimci86 force-pushed the bugfix/font_smooth branch from 861f838 to 12b461d Compare April 19, 2022 08:20
@kimci86 kimci86 force-pushed the bugfix/font_smooth branch from 12b461d to 0a251d1 Compare April 19, 2022 08:26
@eXpl0it3r eXpl0it3r merged commit f7c88ee into SFML:2.6.x Apr 21, 2022
@eXpl0it3r

Copy link
Copy Markdown
Member

Thank you for backporting this to 2.6! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants