Repository navigation
Memory footprint (alpha.18) + Windows CI fixes (alpha.19) - #2
Merged
Merged
Conversation
…ls (0.1.0-alpha.18) - Fallback fonts use only faces the family really has (FontFamily.FamilyTypefaces). Probing missing weights or styles made Avalonia 12 synthesize them, which copies the whole font file three times and keeps it resident (Apple Color Emoji: ~600 MB). - ImagePipeline.DecodeDensity caps the decode density of document images. The default viewer opens at natural size, swaps in the original once it loads, and evicts it on close. - Disk thumbnails: downscaled decodes and rasterized SVGs are written to the disk cache, keyed by bucket and source version (local file size+mtime, or the remote entry's validators). They are looked up before the original bytes are read. The IImageEncoder extension point is new, with WebPImageEncoder in StreamMark.Mermaid; without an encoder they fall back to PNG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….0-alpha.19)
- InlineTextSource matches a fallback font by the first character of the whole
uncovered stretch, not of the run being fetched. Per-line layout fetches runs
from the line start ("首" instead of "。"), and on Windows those can match
different CJK fonts, so incremental breaks differed from the full layout.
- MatchFallback memoizes each character's first match: Avalonia's
TryMatchCharacter prefers previously matched fallbacks (after "한", "。" maps
to Apple SD Gothic Neo instead of PingFang SC), so results depended on history.
- IncrementalLayoutTests.StreamedMixedScripts_MatchFullLayout reproduces both on
macOS (Hangul/Han without spaces); fails before, passes after.
- DiffRenderingTests compares copied text with LF: Windows checkouts turn the raw
string literal into CRLF.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- InlineStyles_Render: decide "a heavier weight exists" by loading the heaviest listed face; on macos-latest PingFang SC lists 600 but loads Medium. - FallbackRuns_UseRealFaces_NotSyntheticCopies: only check fallback runs; on ubuntu-latest there is no CJK font and DejaVu Sans (no italic face) draws the text itself, so its italic is synthesized as for any primary-font italic. - IncrementalLayoutTests: wait for the text segment before reading it; as the first test in the process on x64 Linux one frame was not enough. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Loading Typeface(...).GlyphTypeface for a listed weight is what the fallback code avoids (synthesis, cache pollution); on Windows it made the following FallbackRuns test see a synthetic Yu Gothic Bold/Italic. Decide from the already resolved faces instead: if even the regular run resolved to Medium or heavier (PingFang SC on macos-latest lists 600 but loads Medium), there is no weight to compare. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 of 2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build-testfailures onmain:IncrementalLayoutTests.StreamedLineBreaks_MatchFullLayout_AtEveryStep(styled: False): fallback fonts were chosen by the first character of the fetched run, so per-line relayout (which fetches from the line start) could pick a different CJK font than the full layout. Also Avalonia'sTryMatchCharacterreuses previously matched fallbacks, making results history-dependent. Now matched by the start of the uncovered stretch and memoized per character.DiffRenderingTests.Default_IsGitHubMarkdownStyle_TogglesToSplit: Windows checkout turns the raw string literal into CRLF; compare with LF.Test plan
StreamedMixedScripts_MatchFullLayoutreproduces on macOS (fails 3/3 before the fix, passes after)dotnet test StreamMark.slnxon macOS: 159 + 269 passed🤖 Generated with Claude Code