Skip to content

Conversation

@PeterN
Copy link
Owner

@PeterN PeterN commented Jul 2, 2024

…cal.

The text layouter system can now support using different fonts for different glyphs, including mixing scalable and sprite glyphs.

Motivation / Problem

Description

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, game_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

Comment on lines 404 to 405
// for (auto const &pair : font_mapping) {
// if (pair.second->fc == nullptr || pair.second->fc->IsBuiltInFont()) return nullptr;
// }

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
this->SetDirty();

InitFontCache(false);
// InitFontCache(false);

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.

bool missing = callback->FindMissingGlyphs();
Debug(fontcache, 1, "Font \"{}\" misses{} glyphs", (char *)file, missing ? "" : " no");
for (FontSize fs = FS_BEGIN; fs != FS_END; fs++) {

Check notice

Code scanning / CodeQL

Declaration hides variable Note

Variable fs hides another variable of the same name (on line 128).
@PeterN PeterN force-pushed the side-by-side-font-cache branch from df143b1 to 676cfa9 Compare July 2, 2024 07:58
if (this->level & 1) c = SwapRtlPairedCharacters(c);
this->glyphs.emplace_back(this->font->fc->MapCharToGlyph(c));
this->glyph_to_char.push_back(i);
if (Utf16IsLeadSurrogate(*(buff + i))) ++i;

Check notice

Code scanning / CodeQL

For loop variable changed in body Note

Loop counters should not be modified in the body of the loop.
@PeterN PeterN force-pushed the side-by-side-font-cache branch 2 times, most recently from 536734e to 5c1f9ee Compare November 12, 2024 19:00
@PeterN PeterN force-pushed the side-by-side-font-cache branch from 5c1f9ee to 8b869fc Compare January 11, 2025 18:18
@PeterN PeterN force-pushed the side-by-side-font-cache branch from 8b869fc to 8c9a3fc Compare June 15, 2025 19:17
@PeterN PeterN force-pushed the side-by-side-font-cache branch 5 times, most recently from 0ddd74b to 3a3e5c4 Compare July 6, 2025 07:39
@PeterN PeterN force-pushed the side-by-side-font-cache branch 3 times, most recently from 5bb1484 to 9094cf6 Compare July 16, 2025 07:43
@PeterN PeterN force-pushed the side-by-side-font-cache branch 4 times, most recently from 8d4fbc1 to 1fa0995 Compare August 13, 2025 11:14
@PeterN PeterN force-pushed the side-by-side-font-cache branch from 1fa0995 to a58833b Compare August 26, 2025 19:46
@PeterN PeterN force-pushed the side-by-side-font-cache branch from a58833b to 26001c4 Compare September 27, 2025 17:35
@PeterN PeterN force-pushed the side-by-side-font-cache branch 3 times, most recently from d6d6e87 to 0b0db15 Compare October 1, 2025 16:41
@PeterN PeterN force-pushed the side-by-side-font-cache branch from 0b0db15 to 3f4a150 Compare November 4, 2025 15:58
@PeterN PeterN force-pushed the side-by-side-font-cache branch from 3f4a150 to fe044f5 Compare December 3, 2025 22:37
…cal.

The text layouter system can now support using different fonts for different glyphs, including mixing scalable and sprite glyphs.
@PeterN PeterN force-pushed the side-by-side-font-cache branch from fe044f5 to c94ab8e Compare December 6, 2025 09:56
@PeterN PeterN closed this Dec 6, 2025
@PeterN PeterN deleted the side-by-side-font-cache branch December 6, 2025 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants