Skip to content

Check rich fallback coverage with a plain loop - #98

Merged
bobsingor merged 1 commit into
embedpdf/mainfrom
embedpdf/fix/windows-codepoint-loop
Nov 1, 2026
Merged

bobsingor merged 1 commit into
embedpdf/mainfrom
embedpdf/fix/windows-codepoint-loop

Conversation

@bobsingor

Copy link
Copy Markdown
Contributor

Fixes the win32-x64 and win32-arm64 builds, broken since the fonts work (#93):

core/fpdfdoc/cpdf_annotfontmap.cpp(929,25): error: no matching function for call to object of type 'const __all_of'
note: because 'pdfium::CodePointView' does not satisfy 'input_range'

On a 16-bit wchar_t platform pdfium::CodePointView is a small class meant for range-based for loops, not a range std::ranges::all_of accepts. On Mac and Linux it is WideStringView, so those builds were fine. FindRichFallback() now checks coverage with a plain loop, like CoversText() and every other CodePointView use.

Local checks (darwin-arm64): 1315 unit tests pass; embedder tests unchanged (the 12 known Mac golden failures), including the font fallback and rich text tests. The Windows builds need CI.

On a 16-bit wchar_t platform (Windows) pdfium::CodePointView is a small
class meant for range-based for loops, not a range std::ranges::all_of
accepts, so FindRichFallback() no longer compiled for win32-x64 and
win32-arm64. Elsewhere CodePointView is WideStringView, which is why
the Mac and Linux builds were fine.
@bobsingor
bobsingor merged commit cff0077 into embedpdf/main Nov 1, 2026
1 check passed
@bobsingor
bobsingor deleted the embedpdf/fix/windows-codepoint-loop branch November 1, 2026 16:36
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.

1 participant