Tree:
dfee7f224b
0.10.0-diff-stable-0.9.11
0.8-backports
0.8-work
0.9/xamlx
5940-dragdrop-modal
7963-stable
Blaz
MikeCodesDotNET-coc-update
NumericUpDown_Fix_5318
Stylus
UnsafeAsSpan-logical-children
about-dialog-redesign
add-expanderAutomationPeer
add-integration-tests
add-missing-type-converters
add-remote-designer-test
android-profile
android/render_surface_lock
android_clipboard
android_naot
android_native_window_crash
android_previewer
android_talkback_role_map
android_text_client
animation-fill-modes-test
animations-property-path
aot-test-pipeline
api-diff-demo
appium2-vm-test
archive/wieslop-pr-to-prevent-him-from-deleting-the-repo-again-and-claiming-that-stuff-didnt-happen
attach-dev-tools-conditional
attempt-datacontext-application-class
backport-11096
backports/19939
backup/fixes/catalina-red-window-15-16-08
baget-ci-test
border-clip-test
bug/focus-within-not-cleared
bump-diagnosticssupport
castxml-0.2
chart-control
china
codefreeze-0.7
codice/preview4-plus-10064
comp-size-implicitanim-repro
compile-bindings-by-default-property
composition/license
consistent-names
context-menu-refactor
control-theme-idea
critical-time-visual
customers/chaos-11.0
customers/outsystems-11.1.X
customers/outsystems-11.1.x-without-2-prs-for-testing
customers/outsystems-11.2
customers/outsystems-branches/11.2-test-port-19132
customers/outsystems/11.2-test-port-19132
customers/se-eae
dans-repro
dans-repro-without-1284
datagrid-combobox-column
dbus-tray-icon-fix-2
debug-wasm-clicks
debug/gl-texture-mem-intercept
debug/skia-sharp-vmem
demo
demo1
designer_protocol_theme_variant
dev/timill/EglExternalObjectsFeature
dev/timill/catalyst
dev/timill/dma-buf
dev/timill/init-impeller
dev/timill/macos-setup-app
dev/timill/metal
dev/timill/skiasharp-4-test
dev/timill/styles-animation
dev/timill/win-arm64-build
dev/timill/window-decorations-macos
dev/timill/winui-test
diagnose-ci
direct-comp-archive
disbar
dispatcher-scheduler
do-not-sign-rxui-attempt-2
doc-fixes
dont-self-register-font-manager
drawing-context-hack
droid
effective_viewport_bug_repro
emmaus/gradient_test
empty_text_run_fix
event-setter
exp/drawn-decorations-template
experiment-alpha-niner
experiment/fixing-key-events-macos-embedding
experiment/lazy-load-styles-resources
experiment/merged-fluent-theme
experiment/reflection-free
experiment/skia-known-extensions
experiment/styleinclude-filter
experiments/vulkan-interop-2025-10-29
expose-cut-copy-paste-textbox
feature-presentation-source-2
feature/17731-null-conditional-bindings
feature/2769-control-themes
feature/3109-listen
feature/ImePreeditText
feature/acrylic-brush-investigation
feature/add-get-pixels-to-IBitmapImpl
feature/backdrop-experiment
feature/background-fb-transfer
feature/client-frame-in-titlebar
feature/composition-tree-inspector
feature/crapium
feature/custom-visual-oob-message
feature/custom-visual-sync
feature/drawn-csd-template
feature/epoll-dispatcher-impl
feature/extract-harfbuzz
feature/flaui-webdriver
feature/fluent-calendar
feature/fluent-scrollbar
feature/fluent-slider
feature/fluent-slider-template
feature/fluent-text-box
feature/flyout-overlayinputpassthrough
feature/flyouts
feature/forced-csd
feature/fullscreen-window-state
feature/gpu-improvements
feature/headless-touch
feature/heterogeneous-item-containers
feature/icons
feature/ilogicalvisualchildren
feature/integer-clip-bak-1
feature/integration-tests-vm-migration
feature/linux-automation
feature/linux-automation-backup
feature/managed-chrome-buttons-api
feature/media-queries
feature/microcom-get-managed-reference
feature/offthread-composition-interop
feature/opengl-swapchain
feature/optimized-matrix
feature/pass-shadow-extents-to-platform
feature/pen-eraser-detection
feature/pluggable-input-methods
feature/presentation-source-2
feature/public-frost
feature/remove-legacy-renderers
feature/render-inside-windows-ui-composition-visual-tree
feature/resource-batch-update
feature/resource-dictionary-readonly
feature/resource-lookup-bench
feature/save-render-frames
feature/skia-cpu-copy
feature/staggeredlayout
feature/support-more-image-formats
feature/test-branch
feature/textbox-gestures-mac-cmd+
feature/typed-binding-2
feature/typedbinding
feature/ui-automation-atspi
feature/ui-automation-textprovider
feature/ui-automation-textprovider-2
feature/validate-draw-calls
feature/vulkan
feature/wasm-dispatcher-mt
feature/wayland-deps
feature/wayland-subcompositor
feature/wd/platform-specific-cookies-pointer-events
feature/windowstate-fullscreen
feature/wmt
feature/writablebitmap-drawingcontext
feature/x11-ime-preedit
feature/x11-incr
feature/x11-render-thread-child-resize
feature/xaml-immutable-brushes
features/atspi-peering-mode
features/dbus+atspi2+kdeappiumdriver
features/instant-dark-light-mode-switch
features/manually-managed-layer-textures
features/modal-windows
features/net6-apple-sillicon-support
features/prep1-nullable-reference-types
fies/15433-itemscontrol-interactions-to-containers
fix-ci
fix-mac-special-character-input
fix-mousedevice-not-reporting-clicks-when-any-mouse-button-is-pressed
fix-popup-topmost-windows
fix-windowicon-crash-linuxdrm
fix/DataGridCopyClearsContent
fix/avnview-hittest
fix/gvar-phantom-metrics
fix/ibus-committext-reset
fix/nativecontrolhost-automation
fix/osx-ax-frame-window
fix/osx-ax-honor-ignored-elements
fix/osx-ax-offscreen-noncontrol-children
fix/osx-ax-visible-children
fix/render-stall
fix/text-paragraph-indent
fix_colors_change_event_spam
fixes-data-validation-errors-use-datatemplates
fixes/11167-pagetransition-flicker
fixes/11484-coercevalue-called-multiple-times
fixes/1399-dispatchertimer-disposable
fixes/1440-menu-navigation
fixes/1758-implement-non-recycling-virtualization-mode
fixes/17699-uniformgrid-snapping
fixes/20845-tabitem-datacontext-binding-2
fixes/2129-grid-textwrapping
fixes/21746-update-target-explicit
fixes/22580-macos-paint-runs-normal-jobs
fixes/2725-datatemplate-nested-types
fixes/2957-carousel-stackoverflow
fixes/2983-onewaytosource-twoway
fixes/4293-listbox-remove-item-selection
fixes/4496-selectionmodel-issues
fixes/6684-two-way-style-bindings-with-localvalue
fixes/7777-menu-accelerator
fixes/7925-attached-property-syntax
fixes/9007-priority-in-control-templates
fixes/971-selector-child-of-named
fixes/PreviewWithv12
fixes/android-perf-maybe
fixes/android-render-issue
fixes/appium2
fixes/automation-localization-issues
fixes/avalonia-win32-nullability
fixes/avdbus-impl2
fixes/build-stable-with-6.0.202
fixes/build-task-update-try-fix
fixes/caret-index-lost-when-selection-cleared
fixes/center-screen-maximized-parent
fixes/clear-batch-object-pool-sooner
fixes/compositing-renderer-invalidatevisual-sanity-checks
fixes/disable-fullscreen-overlay-for-border-only-mode
fixes/disable-fullscreenwindow-tests-osx
fixes/dispatcher-frame-dispatcher
fixes/dont-allow-focus-non-visible-elements
fixes/dragdrop-pointer-stuck
fixes/draw-line-on-deferred-renderer
fixes/effect-clip
fixes/effect-clip-rect
fixes/enable-multi-touch-by-default
fixes/fix-android-perf-maybe-2
fixes/gpu-interop-check-dedicated-allocation-needed
fixes/grcontext-options
fixes/hackfix-skia-gpu-interop
fixes/handle-invalid-dirty-rects
fixes/immutable-bitmap-bitmapmemory-backing
fixes/integration-tests-window-management
fixes/less-warnings
fixes/listbox-selecteditem-not-in-item-ignored
fixes/macos-dont-raise-text-input-if-key-handled
fixes/macos-duplicate-a11y-window
fixes/macos-uri-handling
fixes/make-iinlinehost-public
fixes/metal-resize-jitter
fixes/microcom-bump
fixes/ncrunch-references
fixes/nsopenpanel-shortcut
fixes/osx-hidden-window-activation
fixes/osx-rendering-glitches
fixes/pendevice-remove-global-state
fixes/publish-avalonia-native-osx-package-seperately
fixes/pump-dispatcher-before-invoking-native-loop
fixes/re-enable-full-sharpgentools
fixes/readd-references-file
fixes/remove-adorner-hack
fixes/remove-loaded-virtual-method
fixes/render-layers
fixes/resizing-wasm
fixes/round-corner-clip-border
fixes/selectionmodel-handle-move
fixes/stable-disable-roll-forward
fixes/stack-overflow-resources
fixes/standalone-content-presenter
fixes/tcc-333
fixes/text-layout
fixes/textLineMetrics
fixes/ticket-745
fixes/tmp
fixes/too-many-layers
fixes/transitions-property-changes
fixes/tree-selectionmodel
fixes/treeview-nonmaterialized-selection
fixes/wasm-layout-render-sync
fixes/win-ui-comp-global-lock
fixes/win32-maximize-not-applied-initially-when-height-set
fixes/window-close-crash
fixes/window-close-crash-testcode
fixes/window-management-stage-manager
fixes/xamlx-generic-type-resolution
fixes/yet-another-dbus-typing-fix
flickerRepo
fluent-textbox-update
focus-and-keyboard
focus_prototype
focus_tree_state
font-tests
force-ci/11.3-pr-22452
force-ci/composition-rework
force-ci/release-12.1.3-pre
force-ci/xaml-perf-improvements
foreign-embed-squash
foreign-embed-wip
foreign-embed2
git-pr_6982_rework
global-menu
gpu-optimised-deferred-rendering
grid-tests
grokys/experiment/appium-2
grokys/experiment/appium-2-2
grokys/experiment/more-benchmarks
grokys/experiment/new-itemscontrol
grokys/experiment/new-styling
grokys/framebuffer-skip-memcpy
grokys/trying-to-fix-integration-tests
grokys/update-net-5.0
gtk-solution
hack/emulate-touch-events
headless-tests
headless-timers
html-auto-port
ignore-capture-on-pointer-entered-exited
image-filters
image-scrolling-repro
implement-decorated-window-dragging
inlinesTheThird
integration-tests-selenium
ios-dev
ios-fix
issue-457
itemspresenterbase
jw/native-graphics
jw/wip/wayland
keyframe-binding
knock-knock-are-integration-tests-even-alive
layers-wtf-repro
linux-mono-down
main
managed-dialog-extras-0.9
managed-mouse-pointer
manual-fbo
maxkatz6-patch-1
memory-leak-repro-commit
menu-contexntmenu-slection-is-not-consistant
mergeWithDrawingRecording
microcom-net5-features
missing_content_repro
move
move_resize
nativeMenu-leak-fix
nativeMenuItem-leak-macOS-fix
nativeaot-llvm-experiment
ncomposition
new-weak-events
no-layer-hack
no-llvmpipe
no_composition_rounded
notify-test
old/2025-12-06
onformfactor_issue
open-contextmenu-with-keyboard
opentk-integration
osx-fixes
osx/maximised-set-in-xaml-fix
package-control-catalog
page_proto
parma-fixes-2020-10
pivot_touch
platform_feedback
popup-repro
port/wpf-uniformgrid
portable-xaml
pr3/glyph-colorv1
pr4i/variable-face-resolution
pr4j/stat-family-grouping
pr5/cff-cff2-outlines
pr6/glyph-ink-bounds
pr7/variation-cache-bounds
pr8/math-table
pre-lifetime-fixes
property-path
property_transition_stops_repro
psp-repro
pull/14157
rc1-testing
refactor/avaloniapropertystore
refactor/binding-refactor-2025
refactor/binding-to-reflectionbinding
refactor/bindingexpressions-in-valuestore
refactor/bindings-are-expressions
refactor/compiledbinding-refactor-2025
refactor/datavalidation-plugins
refactor/iavaloniaobject-nongeneric
refactor/itemsrepeater-as-itemspresenter
refactor/itemsrepeater-as-itemspresenter2
refactor/layout
refactor/logical-child-optimize
refactor/more-nullable-avalonia-base
refactor/onpropertychanged-nongeneric
refactor/style-priorities
refactor/visual-child-optimize
refactor_pointerover_backportable
release/0.10.0
release/0.10.0-preview1
release/0.10.0-preview2
release/0.10.0-preview3
release/0.10.0-preview4
release/0.10.0-preview5
release/0.10.0-preview6
release/0.10.0-rc1
release/0.10.0-rc2
release/0.10.1
release/0.10.10
release/0.10.11
release/0.10.11-rc.1
release/0.10.11-rc.2
release/0.10.12
release/0.10.13
release/0.10.14
release/0.10.15
release/0.10.16
release/0.10.17
release/0.10.18
release/0.10.19
release/0.10.2
release/0.10.20
release/0.10.21
release/0.10.22
release/0.10.3
release/0.10.4
release/0.10.5
release/0.10.6
release/0.10.7
release/0.10.8
release/0.10.9
release/0.7.0
release/0.8.0
release/0.8.1
release/0.8.2
release/0.8.3
release/0.8.4
release/0.9.0
release/0.9.0-preview1
release/0.9.0-preview10
release/0.9.0-preview2
release/0.9.0-preview3
release/0.9.0-preview4
release/0.9.0-preview5
release/0.9.0-preview6
release/0.9.0-preview7
release/0.9.0-preview8
release/0.9.0-preview9
release/0.9.0-rc.1
release/0.9.0-rc.2
release/0.9.0-rc0001
release/0.9.1
release/0.9.10
release/0.9.11
release/0.9.12
release/0.9.2
release/0.9.3
release/0.9.4
release/0.9.5
release/0.9.6
release/0.9.7
release/0.9.8
release/0.9.8.1
release/0.9.9
release/11.0
release/11.0.0
release/11.0.0-preview1
release/11.0.0-preview2
release/11.0.0-preview3
release/11.0.0-preview4
release/11.0.0-preview5
release/11.0.0-preview6
release/11.0.0-preview7
release/11.0.0-preview8
release/11.0.0-rc1.1
release/11.0.0-rc2.1
release/11.0.0-rc2.2
release/11.0.1
release/11.0.10
release/11.0.11
release/11.0.12
release/11.0.13
release/11.0.2
release/11.0.3
release/11.0.4
release/11.0.5
release/11.0.5-rc1
release/11.0.6
release/11.0.7
release/11.0.8
release/11.0.9
release/11.1
release/11.1.0
release/11.1.0-beta1
release/11.1.0-beta2
release/11.1.0-rc1
release/11.1.0-rc2
release/11.1.1
release/11.1.2
release/11.1.3
release/11.1.4
release/11.1.5
release/11.2
release/11.2.0
release/11.2.0-beta1
release/11.2.0-beta2
release/11.2.0-rc1
release/11.2.0-rc2
release/11.2.1
release/11.2.2
release/11.2.3
release/11.2.4
release/11.2.5
release/11.2.6
release/11.2.7
release/11.2.8
release/11.3
release/11.3.0
release/11.3.0-beta1
release/11.3.0-beta2
release/11.3.0-rc1
release/11.3.1
release/11.3.10
release/11.3.11
release/11.3.12
release/11.3.13
release/11.3.14
release/11.3.15
release/11.3.16
release/11.3.17
release/11.3.18
release/11.3.19
release/11.3.2
release/11.3.20
release/11.3.21
release/11.3.22
release/11.3.23
release/11.3.3
release/11.3.4
release/11.3.5
release/11.3.6
release/11.3.7
release/11.3.8
release/11.3.9
release/12.0
release/12.0.0
release/12.0.0-preview1
release/12.0.0-preview2
release/12.0.0-rc1
release/12.0.0-rc2
release/12.0.1
release/12.0.2
release/12.0.3
release/12.0.4
release/12.0.5
release/12.1
release/12.1.0
release/12.1.1
release/12.1.2
release/12.1.3
release/12.1.4
release/12.1.5
release/12.1.6
release/latest
release/outsystems/0.9.11
remote-devtools
remove-acrylic-blur-from-old-win
removing-compositional-renderer-license
render-only-on-render-thread
repro-ap
repro-ap-1
repro-arcsegment-not-updating
repro-binding-window-state
repro-bindingprio-bug
repro-garbled-graphics
repro-ienumerable-menu-navigation
repro-invalid-draw-calls
repro-items-repeater-issue
repro-properties
repro-req-an-frame
repro-resource-recursion
repro-selected-items-not-working
repro-selecting-items-control-not-working-inside-popup
repro-window-close
repro/1326-data-binding-issue
repro/1436-layout-not-done-after-style-applied
repro/1707-listbox-virtualization-resize-performance
repro/1758-virtualizer-measured-items
repro/18104-drag-drop-flyout-placement
repro/20845-tabitem-datacontext-binding
repro/atspi-get-accessible-at-point
repro/atspi-selection-getselectedchild
repro/binding-attached-property-from-style
repro/binding-isfocused
repro/bound-listboxes
repro/caret-binding-failure
repro/carousel-not-materializing-content
repro/dynamic-resource-bug
repro/macos-nested-loop-in-paint
repro/minimal-repro-stackoverflow-onewaytosource-binding
repro/outsys-sizing-issue
repro/properties-overhaul-bug
repro/radial-gradient-transform
repro/size-to-content
repro/window-not-obey-min-height
repro/x11-position-after-reparent
repros/content-presenter-regression
repros/custom-fonts-pr
repros/text-alignment-issue
repros/web-null-signature
revert-10284-feature/impl-IReadableBitmapImpl-in-SurfaceRenderTarget
revert-13066-fixes/13064-logical-scrollable
revert-14106
revert-18343-bump-dbus-stack
revert-2489-fixes/2432-carousel-insert
revert-2645-issue2613
revert-3221-undecorated-window
revert-selectionmodel
rtb-gl-fixes
scene
scenegraph-after-breakage
scroll-measure
scroll_transition_repro
sdks-update
set-empty-x11-title-instead-of-null
simplify-testing
size-to-content-render-repro
skia-foreign-bitmap
sound
stable-test-mac-os-fix
stable/0.10.0
stable/0.10.x
stable/0.10.x-codice
stable/0.10.x-outsys
stable/0.10.x-se
stable/0.9
stable/outsystems-0.9
stable/parm-0.9
stable/tmp8
strongname
stx/1-text-navigation
stx/10-macos-nstextinputclient
stx/11-android-inputconnection
stx/12-ios-responder
stx/13-win32-tsf
stx/2-automation-text-provider
stx/3-uia-text-pattern
stx/4-atspi-text
stx/5-grid-table-patterns
stx/6-structured-text-input
stx/7-composition-in-document
stx/9-win32-imm
styleable-grid-rowcoldefs
styles-not-getting-applied-repro
system-xaml
tabcontrol-bound-items
temp/implement-hdr
temp/rpi-slowness
temp/testbuild-skia-extensions
test-log-box-shadow
test-meta-packages
test-multiple-optimizations-together
test-package-run
test-saverestore-layer
test-styleable-rowcol-defs
test-sub-menu-item
test/suppressActivationEvents
test/trigger
test11
tests/animations-p1
tests/default-font-fail-nativeaot
testy-test
text-input
text_edit_context_menu_extension
text_ime_client_direct
text_selector_adorner
text_selector_magnifier
text_selector_zindex
thread-issue-repro
timer-overload
tinywm
tmp-2
tmp-angle
tmp-build-dan
tmp-menu-disable
tmp-winuicomp_with_manual_fbo
tmp/11.0
tmp1
tmp4
tmp6
tmp9
toplevel_props
transitions-bugfix-deux
transparency-hints-list
treeview-issue-repro
try-critical-branch-bringup-2
try-fix-3336
ui-automation-test
update-avalonia-dbus-submodule
update-submodules
upgrade-angle
use-net7-tizen
v0.8
virtualized_wrappanel
virtualizeing_wrappanel_rc1
virtualizing_grid
visual-extensions-fallback
visualbrush_recreate
vnc-mouse-drag-issue
vnext
wasm_editcontext
win-ui-comp-with-manual-fbo
win32-jitter-hack
win32_client_pos_test
win32_hidden_border_fix_test
win32_mouse_wheel_zoom
window_hide_test
windowing-prototype
windowing-prototype-drag-and-drop
winit-legacy
wip/use-selectionmodel
wip_snappoint_anchor
x11-mit-shm
x11-test-without-render-window
x11_allowed_actions
xaml_attached_composition_animations
xaml_composition_animations
xaml_integrated_comp_animations
xamlil-debug-info
xclass-generator
xdatagrid-experiment
xi2-leave-event
xpf-old
xpf/composition-rework-branch
xpf/primary-mouse-device
xpf/screen-fix-21750
xpf_win32_test
xsd-generator
xy-focus-and-tvos
xy-focus-skiasharp-3
0.0.1-alpha
0.1.0-alpha2
0.1.1
0.1.10
0.1.2
0.1.3
0.1.4
0.1.9
0.10.0
0.10.0-preview1
0.10.0-preview2
0.10.0-preview3
0.10.0-preview4
0.10.0-preview5
0.10.0-preview6
0.10.0-rc1
0.10.0-rc2
0.10.0.10
0.10.0.4
0.10.1
0.10.10
0.10.11
0.10.12
0.10.12.23
0.10.13
0.10.13.24
0.10.14
0.10.15
0.10.16
0.10.17
0.10.18
0.10.19
0.10.2
0.10.20
0.10.21
0.10.22
0.10.3
0.10.4
0.10.5
0.10.6
0.10.7
0.10.8
0.10.9
0.2.0-preview
0.2.1-preview
0.3.1-preview
0.4.0
0.4.1
0.5.0
0.5.1
0.7.0
0.8.0
0.8.1
0.8.2
0.8.3
0.8.4
0.9.0
0.9.0-preview1
0.9.1
0.9.10
0.9.11
0.9.12
0.9.2
0.9.2.18
0.9.2.19
0.9.3
0.9.4
0.9.5
0.9.6
0.9.7
0.9.8
0.9.9
1.0.1
1.0.4
1.1.1
1.1.2
1.2.1
1.3.1
1.3.4
1.4.1
1.4.2
1.5.1
1.6.1
10367-checkpoint1
11.0.0
11.0.0-preview1
11.0.0-preview2
11.0.0-preview3
11.0.0-preview4
11.0.0-preview5
11.0.0-preview6
11.0.0-preview7
11.0.0-preview8
11.0.0-rc1.1
11.0.0-rc2.1
11.0.0-rc2.2
11.0.1
11.0.10
11.0.11
11.0.12
11.0.13
11.0.2
11.0.3
11.0.4
11.0.5
11.0.5-rc1
11.0.6
11.0.7
11.0.8
11.0.9
11.1.0
11.1.0-beta1
11.1.0-beta2
11.1.0-rc1
11.1.0-rc2
11.1.1
11.1.2
11.1.2-rc1
11.1.3
11.1.4
11.1.5
11.2.0
11.2.0-beta1
11.2.0-beta2
11.2.0-rc1
11.2.0-rc2
11.2.1
11.2.2
11.2.3
11.2.4
11.2.5
11.2.6
11.2.7
11.2.8
11.3.0
11.3.0-beta1
11.3.0-beta2
11.3.0-rc1
11.3.1
11.3.10
11.3.11
11.3.12
11.3.13
11.3.14
11.3.15
11.3.16
11.3.17
11.3.18
11.3.19
11.3.2
11.3.20
11.3.21
11.3.22
11.3.23
11.3.3
11.3.4
11.3.5
11.3.6
11.3.7
11.3.8
11.3.9
12.0.0
12.0.0-preview1
12.0.0-preview2
12.0.0-rc1
12.0.0-rc2
12.0.1
12.0.2
12.0.3
12.0.4
12.0.5
12.1.0
12.1.1
12.1.2
12.1.3
12.1.4
12.1.5
12.1.6
itemssource-checkpoint1
itemssource-checkpoint2
nuget-0.7.1.5
nuget-0.7.1.6
nuget-release-0.5.1
nuget-release-0.6.0
nuget-release-0.6.1
${ noResults }
2962 Commits (dfee7f224b3e61ba4ee3ec8bbe32b5fad9bbdbb5)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
dfee7f224b
|
[Text] Glyph Outline Part 12/17 - FontVariations property, XAML and animation (#22185)
* Bake FontVariationSettings into Typeface
Typeface is the value every text property funnels into before font
resolution, so variable-font axis values belong on it - same pattern as
weight and stretch, and the only way a single settings value can flow
from a style through layout to the renderer.
- both ctors take an optional FontVariationSettings; Empty is coerced to
null at construction so equality, hashing and cache keys never
distinguish the two "design defaults" spellings
- equality and hash include the settings (structural, cached hash)
- Normalize() and the FormattedText per-run updaters (SetFontFamily /
SetFontWeight / SetFontStyle) carry the settings over when rebuilding
* Apply Typeface.FontVariations during font resolution
FontManager is the single seam every Typeface passes through on its way
to a GlyphTypeface, so the user-space settings are applied there - once,
at the end, whichever resolution path produced the base typeface.
- the resolution body moves to a private TryResolveGlyphTypeface (the
default-family recursions target it directly); the public method
resolves, then binds the variations via GlyphTypeface.WithVariations
- per-variation instances are cached on the resolved typeface, so
repeated lookups with equal settings return the same instance (pinned
by test against the embedded Inter Variable)
- font fallback carries the variations over: the matched fallback family
renders at the same axis values the primary typeface requested, each
font clamping to its own axes (CSS behavior)
* Expose FontVariations as an inherited text property
TextElement.FontVariationsProperty is the user-facing entry point for
variable-font configuration, following the FontStretch pattern exactly:
an inherited attached property that every typeface bake site folds into
the Typeface it constructs.
- attached property on TextElement (inherits) + CLR accessors and
Get/SetFontVariations statics
- AddOwner on TemplatedControl, ContentPresenter and TextBlock
- baked into the typeface at every control bake site: TextBlock,
SelectableTextBlock, TextPresenter, TextBox line-height layouts, and
Inline run properties
- property changes invalidate like the sibling font properties
(TextBlock/TextPresenter shaping group, TextElement inline host)
- XAML attribute strings ("wght=700, wdth=85") convert through the
static Parse the XAML compiler picks up - no TypeConverter needed
(pinned by a Markup.Xaml test)
* Animate FontVariations with CSS interpolation semantics
FontVariationSettings.Interpolate blends two settings the way CSS
font-variation-settings does: per-axis linear interpolation when both
endpoints set exactly the same axes (easing overshoot extrapolates),
discrete switch at the midpoint otherwise. Discrete is the only sound
fallback because a missing axis means "the font''s default", a value that
is not knowable in user space.
- FontVariationSettingsAnimator registered like the other value
animators, so keyframe Animations on FontVariations work out of the box
- FontVariationSettingsTransition for the Transitions collection,
following the TransformOperationsTransition pattern
- interpolation contract pinned at the value level (lerp, order
independence, overshoot, discrete mismatches, null/Empty endpoints)
and at the transition level through a test clock
* Quantize normalized coordinates to the F2Dot14 grid
An animated axis sweeps through arbitrary float user values; without
quantization every frame produced a fresh normalized position and a
fresh clone in the per-source variation cache, growing it without bound
across repeated sweeps.
Snap each coordinate to 1/16384 after avar correction. That is the
resolution the font binary itself stores - gvar, avar and the item
variation stores speak F2Dot14 - so no representable position is lost,
while a swept axis lands on at most 32769 distinct cache entries and
sub-resolution user values collapse to one clone (pinned by tests at the
position and clone-identity level).
* Add failing tests for shaping varied typefaces
A variation clone shares the source's HarfBuzz font, so shaping places
its glyphs at default-instance hmtx advances while GlyphTypeface reports
HVAR-adjusted advances for the same glyphs.
- Shaped advances of a wght=900 Inter Variable clone must equal the
clone's HVAR advances and differ from the default instance
- The default position keeps the source's shaper typeface
- Disposing a clone must leave the source shaper usable
* Shape variation clones with their own HarfBuzz coordinates
Layout advances come from HarfBuzz, but a varied GlyphTypeface shared the
source's hb_font, so text set through FontVariations was placed at
default-instance advances while its metrics and bounds were varied.
- HarfBuzzTypeface.WithVariation returns an instance owning a sub-font of
the source font with the normalized coordinates set in fvar axis order;
the face stays shared and only the sub-font is released on dispose
- The sub-font installs the OpenType font functions itself, since the
inherited parent functions evaluate HVAR at the parent's coordinates
- Bind hb_font_set_var_coords_normalized, which HarfBuzzSharp exports but
does not wrap, under HarfBuzzSharp's library name; map it to the
embedded framework on iOS, tvOS and Mac Catalyst, and fall back to the
default instance if the entry point cannot be resolved
- Let Avalonia.HarfBuzz see Avalonia.Base internals to implement the
internal ITextShaperTypeface members
|
3 weeks ago |
|
|
408f2494f0
|
[Text] Glyph Outline Part 11/17 - VVAR vertical advances (#22184)
* Add VVAR for variation-aware vertical metrics VVAR is HVAR's vertical-text counterpart, carrying per-glyph advance- height and top-side-bearing deltas for vertical layout (CJK in tategaki, Mongolian, classical scripts). Horizontal-only fonts skip it entirely — Inter Variable doesn't ship VVAR, so the v-side path stays untouched for horizontal text. After this slice, TryGetGlyphMetrics (single + batch) on a varied typeface honors variation on BOTH axes — H via HVAR (pr4d) and V via VVAR. The full Tier 1 metric surface is now variation-aware: - Per-glyph horizontal advance + LSB → HVAR (pr4d) - Per-glyph vertical advance + TSB → VVAR (this slice) - Font-wide ascent/descent/underline/strikeout → MVAR (pr4f) New VvarTable parser (src/Avalonia.Base/Media/Fonts/Tables/Variation): - 24-byte header: majorVersion, minorVersion, ItemVariationStoreOffset, advanceHeightMappingOffset, tsbMappingOffset, bsbMappingOffset, vorgMappingOffset. One Offset32 longer than HVAR — the trailing vorgMappingOffset references a VORG-table delta mapping that Avalonia doesn't currently consume, so the offset is validated for header soundness but the map isn't loaded. - Wraps the ItemVariationStore from pr4d and up to three DeltaSetIndexMaps (advance, TSB, BSB). When a mapping is absent the glyph ID is used as the inner index directly with outer=0 — same contract HVAR uses. - TryGetAdvanceHeightDelta / TryGetTopSideBearingDelta mirror their HVAR counterparts. VerticalMetricsTable fusion (mirrors the pr4d hmtx + HVAR refactor): - TryGetAdvances / TryGetMetrics batch methods take optional VvarTable + activeCoords. When present, vmtx read and VVAR delta application happen inline in the same loop — output written exactly once per glyph rather than vmtx-writes-then-VVAR-overwrites. - Inline reads via BinaryPrimitives replace the BigEndianBinaryReader state machine, matching the hmtx refactor. GlyphTypeface wiring: - _vvarTable field, loaded in the source constructor alongside HVAR / MVAR and reference-shared in the clone constructor. - TryGetGlyphMetrics (single): the v-side gains the same HVAR-shaped delta application that the h-side got in pr4d — advance height and top side bearing both get the VVAR delta when _vvarTable and _activeCoords are non-null. - TryGetGlyphMetrics (batch): when variation is active, the v-side dispatch passes _vvarTable + _activeCoords to VerticalMetricsTable.TryGetMetrics for the single-pass fused loop. The standalone TryGetVerticalGlyphAdvance(s) public API isn't on this branch stack yet — it lives on pr2e (a sibling of pr2b). When pr2e rebases on top of pr4g, those methods will pick up VVAR through the same _vvarTable + _activeCoords field-access pattern HVAR uses for horizontal advances. Test fixture: AdobeBlank2VF.ttf is the one test font that ships VVAR. Intentionally a "blank" font (2 glyphs, empty outlines, no real glyph shape) — perfect for testing variation-table metadata since VVAR cares about advances/bearings, not outlines. Inter Variable acts as the negative case (variable font WITHOUT VVAR). Tested with 10 new tests: - VvarTableTests (7): static-font rejection, horizontal-only-variable- font rejection (Inter Variable), AdobeBlank2VF load, axis-count mismatch rejection, zero-delta at default variation, zero-TSB-delta when TSB mapping is absent, finite-float guarantee at axis maximum. - GlyphTypefaceVvarMetricsTests (3): TryGetGlyphMetrics on Inter Variable returns identical Height across variations (no VVAR), the AdobeBlank single + batch paths agree and don't crash for varied typefaces, default-variation clone returns source with identical metrics for every glyph. All 511 Media tests + 9 render tests still pass. * Clamp vmtx accessors for zero or truncated metric counts The vertical counterpart of the hmtx clamp: clamp numberOfVMetrics to data.Length / 4 at construction, bail from every accessor when it is 0, and treat a missing trailing topSideBearing entry as zero rather than reading past a truncated table. * Apply VVAR in the advance-only vertical APIs and validate VVAR offsets TryGetVerticalGlyphAdvance and TryGetVerticalGlyphAdvances returned raw vmtx heights without consulting VVAR, so a varied clone reported default-instance vertical advances from these APIs while TryGetGlyphMetrics applied VVAR - a horizontal/vertical asymmetry that mis-positions vertical layout at varied instances. Thread the VVAR table and active coords through both, mirroring the existing HVAR paths (single-glyph adjustment inline, batch via the fused VerticalMetricsTable.TryGetAdvances overload). VvarTable.TryLoad cast its three optional index-map offsets to int and sliced with only a != 0 guard (like the pre-fix HVAR); validate each unsigned against the table length so a hostile offset degrades to "no VVAR" instead of throwing out of the typeface constructor. * Pre-compute VVAR region scalers per clone Give VVAR the same clone-time scaler vector HVAR already has, so the per-glyph vertical delta lookup is an array index rather than a per-axis F2DOT14 ramp. Vertical layouts pay the same reduced per-glyph cost the horizontal path measured: roughly 55 ns to 15 ns of variation overhead per glyph. Fonts without VVAR are unaffected; _vvarRegionScalers stays null and the gating check short-circuits exactly where the coordinate check used to. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Add the variation advance-lookup benchmark Covers the three shapes that matter for the variation work: a static font, a variable font at its default instance, and a varied clone, each at 1 / 20 / 200 / 2000 glyphs, with Skia's GetGlyphWidths as the baseline in both its widths-only and widths-plus-bounds call shapes. Shared typeface loaders and glyph-index arrays live in VariationFixtures so the measured region is the lookup itself. Iteration counts are raised above BenchmarkDotNet's defaults for the single-glyph variants; at sub-2ns those measurements are otherwise dominated by timer noise. This is the harness behind the region-scaler numbers quoted in the two commits below it, and the guard that keeps static and default-instance callers from silently regressing as more variation tables are wired in. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Pass VVAR straight through to the batched vmtx read VerticalMetricsTable.TryGetMetrics already falls back to plain vmtx when the VVAR table is null or the scalers are empty, so the caller-side branch was redundant, as it was for HVAR. * Add failing test for batched vertical advances on a VVAR region TryGetVerticalGlyphAdvances passes the clone's axis coordinates where VerticalMetricsTable.TryGetAdvances expects per-region scalers. AdobeBlank2VF cannot show it because its only delta row uses a region whose scaler equals an axis coordinate, so the test points that row at the two-axis region. * Pass the VVAR region scalers to the batched vertical advance read TryGetVerticalGlyphAdvances handed the clone's axis coordinates to VerticalMetricsTable.TryGetAdvances, which indexes that span by variation region. Batched vertical advances at a varied instance got deltas from the wrong regions, or none when the font has more regions than axes, while the single-glyph path and TryGetGlyphMetrics were correct. - Pass the clone's cached VVAR region scalers. - Drop the caller-side branch: TryGetAdvances already reads plain vmtx when the VVAR table is null or the scalers are empty. * Expose VVAR bottom-side-bearing and vertical-origin deltas VvarTable loaded the bottom-side-bearing map without reading it, and skipped the vertical-origin map while a comment claimed it was parsed and validated. - Load and validate the vertical-origin map like the other three. - Add bottom-side-bearing and vertical-origin delta accessors, with scaler overloads, matching the top-side-bearing ones: a missing map means no variation. --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
3 weeks ago |
|
|
ee4f35bfdd
|
[Text] Glyph Outline Part 10/17 - MVAR font-wide metrics (#22183)
* Add MVAR for variation-aware font-wide metrics GlyphTypeface.Metrics on a varied typeface now reflects the variation point: ascender, descender, line gap, underline thickness/position, and strikeout thickness/position can each carry a per-axis delta. For fonts where these metrics vary substantially (e.g. opsz axis on optical- size fonts, where ascent/descent change meaningfully across sizes), text layout that consults Metrics gets the right values. For fonts like Inter Variable that hold ascent/descent/line gap constant across the weight axis, only the metrics that actually vary (underline + strikeout sizes and positions) are affected — others inherit the source's default-instance value via the "missing record returns no delta" semantics. New MvarTable parser under Tables/Variation: - Header parsing with proper layout: majorVersion, minorVersion, reserved, valueRecordSize, valueRecordCount, itemVariationStoreOffset (the reserved field is a real 16-bit slot in MVAR's header, not the packing detail one might assume — a draft of this PR initially missed it and read every subsequent field at the wrong offset). - ValueRecord array decoded into a Dictionary<OpenTypeTag, (outer, inner)> for O(1) tag lookups. - Wraps the embedded ItemVariationStore (shared infrastructure from pr4d). - TryGetMetricDelta(tag, activeCoords, out delta) returns the delta for a given tag; false when the font doesn't declare a record for it (which is fine — that metric is constant across axis space). - MvarTags companion class with the seven well-known tags this PR maps to FontMetrics fields: hasc, hdsc, hlgp, unds, undo, strs, stro. GlyphTypeface wiring: - Source ctor loads _mvarTable alongside the other variation tables. - Clone ctor reference-shares the table and builds its FontMetrics via ApplyMvarDeltas — a new private static helper that walks each known tag, applies the delta with the correct sign convention (Avalonia stores Ascent/Descent/UnderlinePosition/StrikethroughPosition negated relative to the OpenType raw values, so those tags get subtracted; LineGap and thicknesses are added as-is), and returns a new FontMetrics record. The clone's variation coords need to be projected inside the clone ctor itself, which runs before _activeCoords is assigned — so ApplyMvarDeltas does its own one-shot stackalloc projection. The field's then populated later in the constructor for the gvar / HVAR hot paths. Tested with 13 new tests: - MvarTableTests (6): static-font rejection, variable-font load, axis-count mismatch, Inter Variable's 5 records exactly (stro / strs / undo / unds / xhgt), tags Inter doesn't declare return false, zero-delta at default variation. - GlyphTypefaceMvarMetricsTests (7): static-font no-regression, source metrics at default instance, underline + strikeout thickness grow with weight, ascent/descent/line gap unchanged across Inter weights (verifies the missing-record fallback), default-variation clone returns source, intermediate weight has intermediate metrics. All 508 Media tests + 9 render tests still pass. * Add failing test for MVAR value records larger than 8 bytes A later minor version of MVAR may append fields to each value record, and the spec tells readers to step through the records by valueRecordSize. MvarTable rejects any size other than 8. * Step through MVAR value records by valueRecordSize The MVAR spec allows later minor versions to append fields to each value record and requires readers to locate records by valueRecordSize. MvarTable rejected every size other than 8 and stepped by a fixed 8 bytes. - Accept any valueRecordSize of at least 8 and read the first 8 bytes of each record. - Size the bounds check and the record stride by the declared size. |
3 weeks ago |
|
|
9ce8ffda39
|
[Text] Glyph Outline Part 9/17 - HVAR advance widths (#22182)
* Add HVAR for variation-aware advance widths Squashed during linearization (was: add HVAR+ItemVariationStore; fuse hmtx+HVAR into single-pass batch; cache projected active variation coords). * Validate ItemVariationStore offsets against overflow Keep the regionList and ItemVariationData offsets unsigned and bound-check them with non-overflowing comparisons (offset > length - n) instead of the additive offset + n > length form, which a high-bit (negative-when-cast) or near-int.MaxValue offset slips through before slicing out of range. Widen the regionList span computation to long so regionCount * axisCount * 6 cannot wrap. * Clamp hmtx accessors for zero or truncated metric counts A numberOfHMetrics of 0 (out of spec) or larger than the hmtx bytes drove negative or out-of-range reads. Clamp it to data.Length / 4 at construction, bail from every accessor when it is 0, and treat a missing trailing leftSideBearing entry as zero rather than reading past a truncated table. * Characterize ItemVariationStore/HVAR/hmtx hardening on malformed input Regression guards over the synthetic-font harness: a hostile ItemVariationStore regionListOffset is rejected without throwing, a corrupt HVAR store degrades to "no advance variation" instead of denying the font, and a zero or truncated hmtx metric count no longer throws from an advance lookup at layout time. * Harden ItemVariationStore row math, DeltaSetIndexMap count, and HVAR offsets ItemVariationStore.TryGetDelta computed the delta-row start as `deltaDataStart + innerIndex * rowBytes` in int: with innerIndex up to ~65534 and rowBytes up to ~262140 that overflows negative, slips the `rowStart + rowBytes > length` guard, and throws on the negative span index - reachable from the public metrics APIs with a ~30-byte crafted store. Widen the row offset to long before the bounds check. DeltaSetIndexMap format 1 read its uint32 mapCount straight into an int: a high-bit value became negative and made the size guard compute a negative product that failed open, after which TryGetIndices indexed with a negative position. Range-check the raw count unsigned. HvarTable cast its three optional index-map offsets to int and sliced with only a `!= 0` guard (unlike the IVS offset, which was already checked), so a high-bit/oversized offset threw out of TryLoad and out of the GlyphTypeface constructor - denying an otherwise-valid font. Validate each unsigned against the table length, degrading to "no HVAR". * Pre-compute HVAR region scalers per clone An ItemVariationStore's regions are fixed for the font's lifetime, and a varied clone's active coordinates are fixed for the clone's, so the per-region scaler that the inner delta loop recomputes for every glyph is the same value every call. Compute the vector once at clone construction and the per-glyph HVAR lookup becomes an array index instead of a per-axis F2DOT14 ramp. Measured on a paragraph-size batch advance lookup (i7-12700K, .NET 10): single glyph 52.0 ns -> 16.6 ns, batch 200 11.2 us -> 2.9 us, batch 2000 108.7 us -> 28.9 us. Per-glyph HVAR overhead drops from 55 ns to 14.6 ns, which takes the gap to Skia's GetGlyphWidths from roughly 9x to 2.5x at batch 200. Static and default-instance callers are unaffected: the gating check reads _hvarRegionScalers instead of _activeCoords, and both are null on that path. ItemVariationStore gains ComputeRegionScalers and TryGetDeltaWithScalers; the coordinate-based TryGetDelta stays for callers that have no precomputed vector, such as MVAR's clone-time metric application, which runs before the scalers exist. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Pass HVAR straight through to the batched hmtx read HorizontalMetricsTable.TryGetMetrics already falls back to plain hmtx when the HVAR table is null or the scalers are empty, and a null scaler array converts to an empty span, so the caller-side branch was redundant. * Pass HVAR straight through to the batched hmtx advance read HorizontalMetricsTable.TryGetAdvances already reads plain hmtx when the HVAR table is null or the scalers are empty, so the caller-side branch was redundant, as it was in TryGetGlyphMetrics. --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
3 weeks ago |
|
|
64b21ba1cc
|
[Text] Glyph Outline Part 8/17 - gvar outline deformation (#22181)
* Add gvar parsing and IUP deformation for varied glyph outlines
GetGlyphOutline on a typeface produced by GlyphTypeface.WithVariation
now returns a variation-correct geometry. The deformation pipeline:
- GvarTable parses the gvar header and provides per-glyph entry lookup
(long + short offset formats) and shared-tuple decoding.
- GlyphVariationReader walks each glyph's TupleVariationStore:
- Reads tuple variation headers (peak / intermediate region /
shared-vs-embedded peak tuple).
- Computes per-tuple scaler against the active variation coords
(peak form: linear ramp clamped at the peak; intermediate form:
two-sided linear ramp through start / peak / end).
- Reads packed point numbers (run-length encoded) and packed deltas
(8-bit / 16-bit / all-zero runs).
- Accumulates scaler * delta into per-point x/y delta arrays.
- Applies IUP (Inferred Unreferenced Points) to fill in deltas for
points not in the tuple's referenced list, per the OpenType spec
(linear interpolation between bracketing references, clamp to
nearest reference for outside-bracket points).
GlyfTable.TryBuildGlyphGeometry gained two parameters: GvarTable? and
ReadOnlySpan<float> activeCoords. When both are present and the glyph
has a gvar entry, the deformed control points are built first, then
the contour walker emits the geometry. The walker itself was refactored
to take a Point[] (built per call from the deformed coords or
straight from short coords) so the variation and default-instance
paths share the emission code.
Composite-glyph deformation is partial: each child glyph applies its
own gvar independently (so an accent in 'Á' gets correctly thickened
at wght=900), but composite-level gvar entries that deform component
offsets aren't yet applied. The accent's position relative to the base
stays at the designer's default. That's a follow-up — for the wght-only
case it's visually negligible.
GlyphTypeface loads gvar in its constructor alongside fvar/avar (with
the same cross-table invariants the spec mandates: axisCount must match
fvar, glyphCount must match maxp). Clone constructor reference-shares
the gvar table. GetGlyphOutline projects the variation settings onto
fvar's axis order via a stackalloc'd span — static fonts and default-
instance lookups skip the projection entirely and pay no extra cost.
Tested with 22 unit tests on GvarTable (header parsing, entry lookup,
shared tuples) and GlyphVariationReader (scaler computation for peak
and intermediate forms, IUP single-reference and bracket-interpolation).
Four new render tests:
- 2 visual tests with baseline PNGs: Inter Variable 'R' at wght=900,
composite 'Á' at wght=900. Both visually verify the bolder strokes.
- 2 behavioral tests: bounds differ between regular and wght=900;
wght=700 lands monotonically between regular and wght=900.
The 5 default-instance render tests still pass — the refactored
BuildSimpleGlyphGeometry takes the same code path for unvaried glyphs.
* Bound gvar packed-point and packed-delta reads to their tuple data
The packed readers indexed entry bytes with no validation of
dataOffsetFromEntryStart or tupleDataSize: an over-run past the entry
threw out of TryApplyDeltas and blanked the whole glyph, while an
over-run inside the entry silently consumed the next tuple bytes and
produced wrong deltas. Reads are now sandboxed per tuple - the data
window is clamped to the entry, both readers are bounded Try-methods,
and a tuple whose streams over-run is skipped to its declared end so
the remaining tuples still apply (worst case the outline renders
undeformed instead of blank). Truncated tuple headers stop header
processing, keeping whatever earlier tuples contributed.
* Name the packed point number header bits in GlyphVariationReader
The packed delta reader already uses named flags and masks; the packed
point number reader next to it still used raw 0x80 / 0x7F literals.
* Add failing tests for composite glyph gvar deltas
A composite glyph's gvar entry holds one delta per component that moves the
component's x/y offset. GlyfTable varies each component's own outline but
never reads that entry, and the point-matching path applies no variation at
all. Expected offsets for Inter Variable come from fontTools.
* Apply composite glyph gvar deltas to component offsets
A composite glyph's gvar entry holds one delta per component that moves its
x/y offset, followed by the phantom points. GlyfTable varied each component's
outline but left the offsets at the default instance, so accents stayed where
the default weight puts them. The point-matching path applied no variation.
- Read the composite's entry, each component as a single-point contour so an
unreferenced component keeps a zero delta, and add the delta to x/y offsets.
- Vary the component points the point-matching path resolves, so a matched
component follows the varied point and x/y offsets get their deltas there too.
- Re-bless the InterVariable composite render at wght 900; the accent now
sits where FreeType places it.
|
3 weeks ago |
|
|
d2ee79eb46
|
[Text] Glyph Outline Part 7/17 - GlyphTypeface variation clones (#22180)
* Add GlyphTypeface.WithVariation plumbing (Tier 1) Adds the variation-tracking layer on GlyphTypeface without yet plumbing the variation into Skia rendering or HarfBuzz shaping (those are pr4e1 and pr4e2, gated on the SkiaSharp 4.147 bump). After this slice, code holding a GlyphTypeface can call WithVariation(settings) to obtain a variation-bound clone that tracks the variation point; downstream slices that read GlyphTypeface.VariationSettings (gvar in pr4c, HVAR in pr4d, COLRv1 paint resolution) become variation-correct as they land. Interface additions: - IPlatformTypeface gains VariationSettings (default => default) and WithVariation (default => this) — the no-op contract that keeps Tier 1 shippable without a platform override. Skia implements the real Clone in PR4e1. - ITextShaperTypeface gains the symmetric pair with the same defaults for the HarfBuzz path in PR4e2. GlyphTypeface additions: - VariationSettings property exposes the bound variation point. - WithVariation(FontVariationSettings) returns a variation clone, with a per-source cache so repeat requests for equal settings return the same instance. The cache is unbounded in pr4b — LRU eviction is a follow-up (planning doc, "Cache sizing"). - Private clone constructor reference-shares every parsed table (cmap, glyf, fvar, avar, hmtx, vmtx, name, os2, etc.) and only varies the platform typeface (no-op in pr4b), variation settings, and lazy shaper. Memory cost per variation is a few dozen bytes, not the full table set. - TextShaperTypeface getter on clones derives from the source's shaper via ITextShaperTypeface.WithVariation so face-level shaping state stays shared. - Dispose disposes cached variation clones before the platform typeface to keep ownership clean. Clones skip platform typeface disposal in pr4b (shared with source); the _ownsPlatformTypeface flag flips on automatically once pr4e1 lands a real Skia clone. FontCollectionKey extension: - Adds an init-only Variation property (FontVariationSettings). Default-instance / static-font case uses default(...) so existing three-arg constructions and cache equality stay unchanged. - FontCollectionKeyExtensions.ToFontCollectionKey propagates the variation from both GlyphTypeface and IPlatformTypeface so future consumers building keys from a varied typeface get the right cache entry automatically. Behavior: - WithVariation(default) on a varied clone returns the source — the source IS the default-instance typeface, so cache identity holds. - WithVariation on a static font returns this unchanged (silent ignore — matches CSS and matches CreateVariationSettings). - WithVariation(equal settings) returns the same cached instance. The FontCollection-level projection (FontWeight=Bold on a variable font automatically resolves via wght axis) is deferred. The cache infrastructure is in place; pr4d will wire the projection through FontCollectionBase when HVAR makes it visibly correct. Tested with 15 unit tests covering static/variable behavior, cache identity, clone-routes-through-source, table sharing, and FontCollectionKey equality. All 493 Media tests still pass; render tests still green. * Synchronize lazy TextShaperTypeface creation The lazy getter raced: concurrent first access could create two shapers and leak the loser. Use double-checked locking over a dedicated lock with the backing field marked volatile, so the lock-free fast path observes a fully published instance and exactly one shaper is ever created. * Test that concurrent first access creates one text shaper Exercises the synchronized TextShaperTypeface getter from many threads racing into the first access, asserting exactly one shaper is created (no losing-thread leak). * Include Variation in FontCollectionKey ordering The record-synthesized equality includes the new Variation property but the hand-written CompareTo did not, so keys differing only in variation compared equal while Equals said otherwise - an IComparable contract violation. Compare the variation coordinates lexicographically (they are sorted by axis and zero-canonicalized at construction, so the element-wise order is a total order that agrees with Equals). * Open the public variation front door on GlyphTypeface WithVariation and the platform/shaper seams traffic in normalized coordinates, which are internal after the user-space refactor. Give users a public entry point that speaks user space and normalizes inside: - public GlyphTypeface.WithVariations(FontVariationSettings, int? instanceIndex) = CreateNormalizedPosition + internal WithVariation - normalization runs before the cache lookup, so user-space requests that clamp to the same axis position share one clone (pinned by test) - named-instance selection by index rides the same path * Add failing test for a variation clone disposing its source's shaper A shaper without variation support returns the source's own shaper typeface from WithVariation, so the clone and its source hold the same instance. Disposing the clone must leave the source's shaper usable. - shared instance: the source's shaper must survive the clone's Dispose - distinct instance: the clone disposes the shaper it owns * Dispose a variation clone's shaper typeface only when the clone owns it ITextShaperTypeface.WithVariation defaults to returning the same instance, so a clone of a font whose shaper has no variation support holds its source's shaper typeface. Disposing the clone disposed that shared instance and left the source with a dead shaping font. - the clone records whether WithVariation produced a distinct instance - Dispose releases the shaper only when the clone owns it * Add failing tests for variation clone lifetime A source GlyphTypeface caches its variation clones and disposes them with itself. Two cases break that ownership: - Disposing a clone directly leaves the disposed instance in the source cache, and the next request for the same position returns it. - WithVariations on a disposed source, or on one of its clones, creates a new clone on released resources that nothing disposes. * Make variation clones owned by their source typeface A source GlyphTypeface caches its clones and hands the same instance out again for the same position, so a clone disposed by a caller came back disposed. A disposed source also kept creating clones on released resources. - Dispose on a clone does nothing; the source disposes its clones with itself. - WithVariations throws ObjectDisposedException once the source is disposed. - Document the ownership on WithVariations. - Drop the test that expected a clone's own Dispose to release its shaper; the source-disposal test covers that release now. |
3 weeks ago |
|
|
eae84c1403
|
[Text] Glyph Outline Part 6/17 - fvar / avar parsing and the variation axis API (#22179)
* Add fvar/avar parsing and variation-axis API Parses the OpenType fvar (variation axes + named instances) and avar (per-axis segment maps) tables, and exposes them on GlyphTypeface: - VariationAxes / NamedInstances — read-only metadata for variable fonts; empty IReadOnlyList for static fonts. - CreateVariationSettings(userSpace, instanceIndex) — normalizes user-space axis values to the [-1, 1] range FontVariationSettings requires, applying fvar's two-sided linear normalization and avar's segment-map correction. Returns default(FontVariationSettings) for static fonts or when every axis resolves to its default value, so cache identity holds for "no variation" requests. New public types FontVariationAxis (record struct) and FontVariationInstance (struct with index-based equality) live in Avalonia.Media alongside FontVariationSettings. The new code is entirely in Avalonia.Base.Media and has no SkiaSharp / HarfBuzz dependency — it's Tier 1 of the variable-font rollout (the plumbing that lets GlyphTypeface track variations) without yet plumbing the variation into the platform layer. The follow-up slices (pr4b plumbing, pr4c gvar+IUP outline deformation, pr4d HVAR for variation-aware advances) build on this. Tested with Inter Variable (2 axes: opsz 14..32, wght 100..900, plus 9 named instances). Inter Variable's avar wght axis carries a non-trivial bend (0.2 -> 0.18, 0.4 -> 0.36, ..., 0.8 -> 0.76) that the tests verify end-to-end via CreateVariationSettings. * Harden fvar/avar against malformed variable fonts - fvar: cap axisCount at 64. The spec allows up to 65535, but an unclamped count flows into per-axis stackalloc float[axisCount] buffers in the gvar reader (added later in the stack) — an uncatchable StackOverflow on a hostile font. Real fonts have at most ~15 axes; treat anything larger as static. - avar: wrap the segment-map read loop in try/catch so a truncated optional avar degrades to identity normalization instead of throwing out of the GlyphTypeface constructor and denying the whole font. * Characterize fvar/avar degradation on malformed input Regression guards over the synthetic-font harness: an unclamped fvar axisCount is rejected (the font loads static instead of feeding the gvar stackalloc), and a truncated optional avar degrades to identity normalization instead of denying the font. * Treat non-monotonic avar segment maps as identity Remap interpolates assuming segment entries ascend by fromCoordinate; a hostile or corrupt map with descending entries produced wrong (although bounded) remappings. Validate monotonicity at load and degrade such an axis to the identity mapping, keeping the reader aligned for the remaining axes. Degenerate equal-from segments stay tolerated - Remap handles them explicitly. * Add failing test for avar segment maps missing a required identity entry The avar spec requires every non-empty segment map to contain -1 -> -1, 0 -> 0 and +1 -> +1, and leaves the axis unmodified when one is missing. AvarTable remaps such axes anyway. * Leave avar axes unmodified when a required identity entry is missing The avar spec requires a non-empty segment map to contain -1 -> -1, 0 -> 0 and +1 -> +1, and says the axis is not modified when any of them is missing. TryLoad accepted such maps and Remap interpolated or extrapolated through them. - Treat an axis whose map lacks one of the three entries as identity, the same way a non-monotonic map already is. |
3 weeks ago |
|
|
b0ad044a65
|
Dispose the buffer ShapeTogether splits between its runs (#22626)
* test: add a failing test for the buffer ShapeTogether splits * fix: dispose the buffer ShapeTogether splits between its runs * Cover the intermediate halves in the ShapeTogether test The buffer the shaper returns is only the first one ShapeTogether splits. With three runs the second half is split again, and that buffer never passes through the shaper, so the test could not see it leak. - assert that only the runs on the line reference the shared glyph storage - add ShapedBuffer.GlyphStorageRefCount as a test hook for that count - dispose the formatted line --------- Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> |
3 weeks ago |
|
|
626c94d77c
|
Resolve Bidi W2 strong context in one forward pass (#22545)
* Add a regression for repeated Bidi numeric prefix scans * Resolve the preceding Bidi strong context in one forward pass Keep the W2 preceding strong class local to each isolated run rather than rescanning the numeric prefix for every European number. Preserve Arabic conversion, inherited marks, isolates and paragraph reuse. The before 60000-number regression takes 3.266 seconds; the correction passes its one-second bound. Six focused checks and the full Base and Skia suites pass with their 14 existing skips retained. The net8 Base build is also green. * Replace the timed Bidi number test with W2-sensitive level checks - Drop the wall-clock bound; it flakes on loaded agents and can pass the quadratic scan on fast ones - Add rows where the EN to AN conversion changes levels through W4/W5, since EN and AN otherwise resolve alike - Rename the class now that it holds only correctness checks --------- Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> |
3 weeks ago |
|
|
c67550d9ec
|
Use ordinal comparisons for pseudoclass checks and IterationCount.Parse (#22604)
* test: add failing tests for culture-sensitive class and IterationCount checks Culture-sensitive comparisons ignore a soft hyphen (U+00AD), so a class that starts with one followed by ':' is treated as a pseudoclass, and "Infinite" followed by one still parses as Infinite. * fix: use ordinal comparisons for pseudoclass checks and IterationCount.Parse These checks test syntax, so a culture-sensitive comparison gives wrong answers for ignorable characters and opens an ICU collator on the UI thread at startup. * refactor: spell out the ordinal comparison in IterationCount.Parse The char overload was already ordinal, but no test covers this check, so say so explicitly, as the EndsWith check above it does. |
3 weeks ago |
|
|
584ae6f3a7
|
Fix concurrent FallbackStorageProvider calls failing after the first success (#22596)
Co-authored-by: Max Katz <maxkatz6@outlook.com> |
3 weeks ago |
|
|
c1e4fab24c
|
Stop AvaloniaList from throwing when asked whether it contains an invalid item (#22577)
|
4 weeks ago |
|
|
e4452b5bdb
|
Require the same button for both clicks of a double tap (#22429)
* Add double tapped test * Check both clicks are left for double tap * Add a test for the click count restarting on a different button * Restart the click count when the pressed button changes --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net> Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com> |
4 weeks ago |
|
|
d8f2fc7b9f
|
Limit the line break search to the reach of the current line (#22554)
* Add failing tests for wrapping long unbroken runs - Wrapping the first lines of a 900k character unbroken run scans the whole remaining run for every line. - WrapWithOverflow overflows a word that has no break opportunity in reach instead of breaking at the fitting length. - Required breaks and short overflowing words are pinned. * Limit the break opportunity search to the reach of the current line - The line break enumerator was created over the whole remaining run for every line, so wrapping a long unbroken run was quadratic. - Enumerate only the fitting length plus a fixed lookahead. - A word without an opportunity in reach breaks at the fitting length, as Wrap does, instead of overflowing with WrapWithOverflow. * Add failing test for whitespace longer than the break lookahead - Trailing whitespace hangs on the line however long it is, but the lookahead window ends inside a long run and wraps it across many lines. * Cover trailing whitespace in the break lookahead - Whitespace after a break hangs on the line however long it is, so a window ending inside a long run dropped the break after it and wrapped the run over many lines. - Extend the window over the whitespace run and the character that ends it. * Apply the break lookahead limit inside the line break enumerator - The enumerator stops at an internal limit and reports it through LimitReached, so the caller no longer slices the text, skips a synthetic end-of-window break or patches surrogate pairs. - Whitespace uses the enumerator's own line break classes: a run that reaches the limit is consumed together with the break that ends it, in a single pass. * Remove the wall-clock wrapping test - The timing assertion measures performance rather than behavior and depends on the machine; the remaining tests pin the line lengths. |
4 weeks ago |
|
|
9135170769
|
Improve XML documentation in ICustomHitTest (#22557)
Updated XML documentation for clarity and accuracy. |
4 weeks ago |
|
|
26b4ed5b35
|
Fix a crash when a control moves to another top level during layout (#22491)
* Add test * Keep the layout pass off controls that moved to another window |
4 weeks ago |
|
|
0d6c2aaa81
|
Fix TextLayout.HitTestPoint IsInside for multi-line and aligned text (#22433)
* Test HitTestPoint IsInside on lines after the first Add a test that hit-tests a point over the first character of each line in a three-line TextLayout, once with hard line breaks and once with wrapping. HitTestPoint incorrectly returns IsInside = false for a point over a character on any line below the first. The CharacterHit is correct. * Fix HitTestPoint IsInside on lines after the first Check IsInside against the point's offset from the top of the hit line instead of from the top of the layout. * Pass a line-relative point to GetHitTestResult Translate the hit point into the hit line's coordinates in HitTestPoint instead of passing the line's top to GetHitTestResult, so the helper works in a single coordinate space. The check for a point below the text becomes y > textLine.Height, which is equivalent because only the last line can have a point below it. * Test HitTestPoint IsInside on aligned lines Add a test that hit-tests a point just inside the right edge of a centered or right-aligned line, in both flow directions. HitTestPoint incorrectly returns IsInside = false because it ignores the line's horizontal offset. * Fix HitTestPoint IsInside on aligned lines Also translate the hit point horizontally by the line's Start, so the point passed to GetHitTestResult is relative to the line's top-left corner as documented. * Test HitTestPoint outside aligned lines and aligned/left parity - Points left of, right of, above and below an aligned line must not report IsInside, guarding against the line-relative translation over-correcting. - An aligned layout hit at Start + dx must give the same CharacterHit, TextPosition, IsInside and IsTrailing as a left-aligned layout hit at dx, which covers the newline trimming that now sees line-relative x. --------- Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
4 weeks ago |
|
|
88a7967b3e
|
fix (#22487)
|
4 weeks ago |
|
|
d3fcf74a91
|
Fix paragraph end handling in bidirectional text lines (#22553)
* Add failing test for hit testing a line that ends in RTL text before a paragraph end A TextEndOfParagraph run must not change bounds, run indices or caret distances of the text before it. Lines whose last text run is right-to-left and sits visually next to the paragraph end report shifted bounds today. * Derive a text line run's direction from its reordered bidi level TextLineImpl gave runs without glyphs whatever direction the caller asked about, while BidiReorderer places TextEndOfLine at level 0. When text ends in RTL, the paragraph end sits visually after the trailing RTL run, so it was pulled into that directional span. The right-to-left walk consumes the span visually from the right, so it consumed the paragraph end first and every glyph after it was measured one character off: empty bounds for the first RTL character and a full-range query one character short. Only text sources that end with TextEndOfParagraph (TextBlock, SelectableTextBlock) are affected. - Store the level each run was reordered with on IndexedTextRun. - GetTextBounds and GetDistanceFromCharacterHit read direction from that level; the duplicated content-based direction helper is gone. - A range that includes the paragraph end of an LTR paragraph ending in RTL text now reports the paragraph end as its own empty LTR bounds at the line end instead of merging it into the RTL span. * Add failing test for the paragraph end position in right-to-left paragraphs The paragraph end belongs at the logical end of the paragraph: the right edge of a left-to-right line and the left edge of a right-to-left line. Caret distance and bounds put it at the right edge in both directions today. - A wrapped TextLayout must get the same lines with and without a TextEndOfParagraph, so moving the paragraph end cannot bring back the extra line RTL wrapped text used to measure. * Give the paragraph end the paragraph embedding level BidiReorderer forced TextEndOfLine to level 0 so it would always be the last visual run. That hid TextLineImpl reading the visual run array as if its last run were the logical end of the line: in a right-to-left paragraph the end run is visually first, FinalizeLine missed the line break and wrapped text measured an extra line. Level 0 broke the Unicode bidi rule that a paragraph separator takes the paragraph level, and put the paragraph end of a right-to-left line at its right edge, where the line starts. - TextEndOfLine takes the paragraph level again. - FinalizeLine and GetCharacterHitFromDistance find the end run through the logical run order, wherever it sits visually. - Caret distance and bounds at the paragraph end of a right-to-left line now land on the left edge. |
4 weeks ago |
|
|
6cef02f424
|
Fix `Tapped` when target moves (#22427)
* Add slider test * Fix --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
4 weeks ago |
|
|
1fd3c0830e
|
Refresh indexer bindings on Item[] and Item[key] notifications (#22227)
* Add tests for indexer bindings notified with Item[] or Item[key] Indexer bindings only refresh when the source raises "Item", so they miss "Item[]" from ObservableCollection and "Item[key]" from AvaloniaDictionary. Also checks that an indexer binding on an ObservableCollection publishes once per change. * Refresh indexer bindings on Item[] and Item[key] notifications Treat "Item", "Item[]" and "Item[key]" as an indexer change in the reflection indexer node and in both compiled property accessors. Compiled bindings to an AvaloniaDictionary entry now update when the entry changes. Accessors that already listen to CollectionChanged ignore these names, since CollectionChanged says exactly which indexes changed and ObservableCollection raises "Item[]" for every change. Fixes #20313 * Require closing bracket in an Item[...] name |
4 weeks ago |
|
|
b515c3ae17
|
Add per-area verbosity overloads to LogToTrace and LogToDelegate (#22523)
Adds LoggingExtensions.LogToTraceAreaVerbosity and LogToTrace/LogToDelegate overloads that take it, so each log area can have its own minimum level. Fixes #21810 |
1 month ago |
|
|
9b3e9c881b
|
Rotate render target output in the compositor (#22499)
* Rotate render target output in the compositor Expose the required surface orientation through render target properties and rotate retained-layer copies and overlays. Replace the DRM rotation framebuffer and shaders with the shared EGL render target. Validate quarter-turn output, orientation changes and rotated overlays with Mesa render tests. * Rename RequiredRotationForOrientation --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
1 month ago |
|
|
f547369621
|
Align Dispatcher to the platform clock with an offset (#22496)
* Add failing tests for dispatcher timers on the wrong clock * Align Dispatcher to the platform clock with an offset `Dispatcher` stamped due times with a clock fixed in its constructor, but the platform layer reads them against its own. When the platform layer is installed after construction, such as in `InitializeUIThreadDispatcher`, those clocks differ and timers fire early or late. `Now` follows the current platform clock, with an offset that keeps it continuous across the swap. Due times are converted back to the platform's clock when handed over. |
1 month ago |
|
|
19952840c5
|
Browser: pass input through a queue in WASM memory (#22478)
* Browser: JS-wakeable managed dispatcher for multithreaded WASM ManagedDispatcherImpl gets a pluggable IWakeupEvent plus BeforeWait/AfterWakeup hooks. The browser MT build backs it with an int32 in linear memory (native/avalonia_browser_dispatcher.c, atomic.wait32/notify) so JS on the main thread can wake the dispatcher thread via MultiThreadedDispatcherHelper.signal without entering managed code. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Update browser launch config * RawEventGrouper: add DrainAll and keep platform points when merging moves - Add HasJobs and DrainAll to AutomaticRawEventGrouperDispatchQueue for inline, synchronous dispatch. - Dequeue under the lock in DispatchFromQueue; only re-post when jobs remain. - When merging move events, keep intermediate points the platform already attached to the merged-in event, and take the newest point with all of its properties. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Browser: pass input through a queue in WASM memory Pointer, wheel and key events are encoded by JS into a queue in WASM linear memory and decoded by C# in one batch per burst, instead of one interop call per DOM event. - The queue is a chain of segments. C# allocates the first one and the control block; JS appends records to the last segment and allocates a new one with Module._malloc when a record doesn't fit. C# follows the links and frees segments it has read past. _malloc is added to EmccExportedFunction. - JS sets wakeRequested in the control block after publishing a tail and signals the dispatcher if it was clear; C# clears it before reading the tail, so a record published after the consumer's last read always wakes it. - Decoded events go through the per-top-level RawEventGrouper on both runtimes. Pointer moves carry getCoalescedEvents points as intermediate points, replacing the getCoalescedEvents interop call. - Single-threaded: JS posts the dispatcher signal, and OnSignaled drains the queue before running jobs, so a burst costs one macrotask and one managed entry. Key events and pointer presses are flushed synchronously: the handled state is known before preventDefault, and actions that need a user gesture (focusing the text input for the iOS on-screen keyboard) run inside the DOM handler. - Multithreaded: JS wakes the dispatcher thread directly through MultiThreadedDispatcherHelper.signal. BrowserQueueDispatcherInputProvider drains the queue on every pending-input query, which replaces the BrowserMultiThreadedDispatcherHooks. - Composition and drag events bypass the queue and flush it first to keep ordering. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Browser: use the DOM event clock for text input timestamps Queued pointer, wheel and key events carry the DOM event.timeStamp, but text input from composition end used a per-top-level Stopwatch. Pass the compositionend timeStamp through instead, so all input shares one clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Browser: convert line and page wheel deltas to pixels Wheel deltas were passed through as-is and scaled as pixels, so line-mode wheels barely scrolled. JS now converts line and page deltas to pixels before queuing, reading the deltas before deltaMode so Firefox keeps reporting pixels where it can. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Browser: compute MT dispatcher wait timeout from ticks Convert the timeout with integer ticks instead of a double round-trip, and treat timeouts too long to express in nanoseconds as an infinite wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Browser: generate the input queue layout for JS from C# structs The queue layout was written twice, as offset constants in BrowserInputQueue.cs and inputQueue.ts, kept in sync by hand and an ABI version. - BrowserInputLayout holds the control block, segment header and record layouts as sequential structs and the enums they use; C# reads records through them. - The new Avalonia.Browser.BuildTasks project links BrowserInputLayout.cs and its GenerateInputLayoutTask writes inputLayout.g.ts before the web app build: a const enum per struct with field offsets and $size, and a const enum per enum. It fails the build on implicit padding, so the generated offsets match the struct layout on any runtime. - JS writes records through typed-array views over the heap instead of a DataView. - JS copies DOM event fields as they are. Mapping buttons and modifier keys, and converting line and page wheel deltas to pixels, moves to C#, including for drag events. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Browser: suppress default actions only for input Avalonia handled Keys and mouse/pen presses are dispatched inside their DOM handler on the single-threaded runtime, so the handled state is known before the browser applies the default action. Use it: unhandled keys (browser shortcuts, page scroll keys) and unhandled mouse/pen presses now reach the browser. FlushSync reports the handled state of the record just posted rather than the last event dispatched, which differ when the record produced no event. Presses are still suppressed while the hidden text input has focus, so the compatibility mousedown can't take focus away from it, and for touch, which doesn't report a handled state. Moves and wheel are not flushed and stay suppressed, as does everything on the multithreaded runtime, where the handled state isn't known in time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Disable dispatcher warnings where it's expected to block the thread * New dispatcher hooks should be internal, only used in tests * Use >>> in TypeScript input queue code to be safe * Ensure Pack=1 on browser queue interop structures * Validate browser input record sizes before decoding Check that each record is large enough for its type, and that coalesced points and key/code strings fit within the record before reading them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Remove "Count: > 0" check for IntermediatePoints, so we still dispose the pooled list * Use Dispatcher.UIThread.Post for MT direct input events * Remove new unused code * DrainAll method was actually used, IDE fooled me --------- Co-authored-by: Nikita Tsukanov <keks9n@gmail.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> |
1 month ago |
|
|
612785a8e2
|
Use Command-based hotkeys on Apple platforms in Browser (#22468)
|
1 month ago |
|
|
c1a1246745
|
fix: Support StylableElement for styles inside ContainerQueries (#22167)
* fix: Support StylableElement for styles inside ContainerQueries * chore: Add container query sample for TableView columns Demonstrates a container query that targets a non-visual StyledElement, as requested in the PR review. The option row wraps so that it does not clip while the page is narrowed. |
1 month ago |
|
|
fd6f6fff56
|
Remove mutable StreamGeometryImpl (#22247)
* Remove mutable StreamGeometryImpl * Update API suppressions |
1 month ago |
|
|
c1da1af3b7
|
Added fix for the issue-22338, added thread-safe ConcurrentDictionary cache change for concurrent avares:// asset resolution. (#22352)
|
1 month ago |
|
|
5705e633dd
|
Release detached visuals from a stopped CompositingRenderer (#22369)
* test(rendering): cover visuals removed while rendering is stopped A stopped CompositingRenderer skips its update pass, so nothing drains the pending visuals. A visual that leaves the tree in that state must not stay referenced by the renderer. Visuals that remain in the tree must stay queued until rendering resumes. The test fails: the renderer still references the removed visuals. HasPendingUpdateForUnitTests exposes the pending state so that the test does not depend on garbage collection. * fix(rendering): release detached visuals from a stopped renderer A minimized or hidden window stops its renderer. A stopped CompositingRenderer skips its update pass, and that pass is the only place that clears the dirty and recalculate-children sets. Each visual that detached in that state stayed in the sets, so a window that kept changing its content while minimized retained every removed visual until rendering resumed. A visual reports itself dirty one last time when it detaches, after it has dropped its composition visual. The update pass ignores such an entry. Remove the visual from both sets at that point instead of adding it, and still request a composition update so that the detach is committed. Visuals that remain in the tree stay queued, so a restart still resumes the pending update. * chore: trim code comments |
1 month ago |
|
|
2624619128
|
Fix `Arc` Calculation and Update `ArcSegment` Comments (#22404)
* Fix the rotationAngle in the Arc shape * Update ArcSegment comments to match ArcTo() |
1 month ago |
|
|
1ac9309278
|
Fix Comments for `PreciseArcTo()` (#22402)
* Fix comments for PreciseArcTo() rotation angle units
* Make PreciseEllipticArcHelper access modifiers explicit and restrict EllipticalArc
* Fix indentation
* Revert "Fix indentation"
This reverts commit
|
1 month ago |
|
|
a9429a3280
|
Fix duplicate insertion of shared StyleInstance into the same ValueStore (#22276)
* Fix duplicate insertion of shared StyleInstance into the same ValueStore StyleBase cached a single shared StyleInstance per ControlTheme and reused it for every attach, regardless of the FrameType it was attached as and regardless of whether it was already present in the target's ValueStore. The same ControlTheme can legitimately be attached to one control twice (once as its own Theme and once via the templated parent's theme), and on re-attach / re-application of styling the cached shared instance was inserted a second time into the same store, triggering - Cache shared instances per FrameType (Theme / TemplatedParentTheme) - Only reuse a shared instance if it is not already in the target store * Cache shared style instances per FrameType; drop redundant ContainsFrame Address review feedback on #22276: - Replace the two shared-instance fields with a fixed-size array indexed by FrameType, giving one cached instance per frame type (Style, TemplatedParentTheme, Theme). InlineDictionary was considered but requires a class type key, so an array indexed by the enum is the equivalent zero-allocation structure. - Remove the ContainsFrame linear scan: with one instance per frame type a duplicate insert of the same instance into the same ValueStore is no longer possible, because OnControlThemeChanged / OnTemplatedParentControlThemeChanged always RemoveFrames(type) before re-attaching. This is now proven by unit tests. - Add unit tests: - ControlTheme attached as both Theme and TemplatedParentTheme to the same control creates two distinct instances. - Re-attaching after RemoveFrames does not duplicate the instance. - The same instance is shared between different controls for the same frame type. * Avoid per-style array allocation for the single shared instance case Address review feedback: the vast majority of styles only ever have a single shared instance, so keep a plain field + FrameType for that case and only allocate the FrameType-indexed array lazily once a second frame type is shared. This removes the extra array allocation added to every style by the previous implementation. * Address review nits: succinct comment, avoid eager GetSharedInstance call - Shorten the shared-instance comment per the AI guidelines. - Invert the condition so GetSharedInstance is only called when canShareInstance is true. * Comment shortened to two lines :) |
1 month ago |
|
|
16572aeff1
|
Fix keyboard focus staying on a removed element when an overlay popup or flyout closes (#22345)
* Add failing test for focus staying on a removed or hidden element When a focus scope is removed or hidden while its focused element has the focus and the root scope's focused element can't be focused (e.g. a button disabled while its command waits for a choice in a flyout), the keyboard focus stays on the removed or hidden element. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Clear focus when the focused element is removed or hidden and can't be restored Focus(null) leaves the focus alone when the focused element is in another focus scope than the focus root, but a removed or hidden element also passes that check. Only apply it while the focused element is attached and visible. Fixes #22342 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add popup tests with actual focus services --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
1 month ago |
|
|
a6df0e3c39
|
Fix re-attaching a child visual cleared on detach (#22334)
* Add a failing test for re-attaching a cleared child visual A control that sets a child visual on attach and clears it on detach cannot attach the same visual again: the cleared child stays parented to the element's discarded composition visual. * Un-parent the previous child visual when replacing it SetElementChildVisual left removing the old child to the renderer's next sync of the element's children. That sync may never come: a control that clears its child visual in OnDetachedFromVisualTree does so before DetachFromCompositor discards the element's composition visual, so the old child stays parented to it and attaching it anywhere later throws. Remove the previous child from the element's composition visual directly. |
1 month ago |
|
|
2d86da9385
|
Fix StreamGeometry Clone and Open when a Transform is set (#22303)
* Add render tests for StreamGeometry Clone and Open with a Transform * Fix StreamGeometry Clone and Open when a Transform is set * Add tests for when a geometry reports that its drawing changed * Report the change when the drawing finishes, and let PathGeometry.Open add figures * Remove the comments and revert the interface type |
1 month ago |
|
|
3a184fe735
|
Fix showing ellipsis when word wrap and limited by height or MaxLines (#22025)
* Fix showing ellipsis when word wrap and limited by height or MaxLines. * Simplify fix based on comment * Align height clip behavior with WPF/HTML when last visible line fits in the available width No ellipsis is shown in this case so I guess it makes sense for Avalonia to behave the same. * Clarify truncation comments and cover them at the TextLayout level - Reword the MaxHeight and MaxLines truncation comments: the two limits differ on purpose (a height cut only ellipsizes a soft-wrapped line, a line-count cut ellipsizes after a hard break too, like CSS line-clamp). - Add TextLayout tests with the real shaper for MaxLines at a hard break, MaxHeight at a hard break and MaxHeight at a wrapped line, so the behavior is guarded below the TextBlock layer. --------- Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> |
1 month ago |
|
|
be9b480f10
|
Fix bidi explicit formatting after reset (#22288)
* Add failing tests for bidi controls being ignored after the first paragraph * Allow embedding and isolate flags to be set after a reset Append only set HasEmbeddings and HasIsolates if they had no value, but Reset sets them to false. Once a BidiData had been reset, explicit formatting characters could no longer raise them, so overrides, embeddings and isolates were only applied only applied in the first paragraph formatted on a thread. HasBrackets is reset the same way, this makes the flags match. * Escape bidi control characters in tests --------- Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> |
1 month ago |
|
|
f4591beca4
|
DiagnosticTextRenderer: Make numbers monospace (big perf win) (#21860)
* DiagnosticTextRenderer: Make numbers monospace * Center diagnostic digits in their own cell and derive line height from metrics - Digits were centered against the widest printable ASCII glyph instead of the digit cell, so each digit was drawn right of its cell, overlapped the next glyph and the last one left the background rect. Center against the digit cell and drop the unused max glyph width. - Compute the line height once from the font metrics (LineSpacing scaled to the em size) instead of scanning glyph run bounds, which already resolve to that value. - Add tests for fixed digit width, cell centering, stable trailing text and the metrics-based height. * Draw the FPS line from shaped labels and a fixed digit grid - Shape the static labels once into single glyph runs and draw the frame number, FPS and visual counts as zero-padded digits in fixed cells. A frame no longer formats a string or measures text. - Rebuild the memory text only when the pool sizes change, and compute the background rect width once. - RenderFps takes the raw memory and visual counts instead of a preformatted string. Counters now have a fixed width (frame 8 digits, FPS 3, visual counts 5) and clamp instead of growing. - Hoist the translucent layer brush into a static field. --------- Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> |
1 month ago |
|
|
b76623d46e
|
[Text] Fix RunIndex mapping in BidiReorderer (#22384)
* [Text] Fix RunIndex mapping in BidiReorderer Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * [Text] Cover BidiReorderer run index mapping at both layers - BidiReordererTests: assert RunIndex is the visual position of each logical IndexedTextRun, and that textRuns ends up in visual order, for level sequences that form non-involutive permutations (the old lookup only worked for swaps and reversals). - TextLayoutTests: splitting runs with style spans must not change line width, per-character bounds or hit-test results, across LTR and RTL paragraphs with mixed Hebrew/Latin/digit text. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Benedikt Stebner <Gillibald@users.noreply.github.com> |
1 month ago |
|
|
11ea9b1120
|
Return empty text bounds for zero-length ranges (#22344)
* Add regression tests for empty text layout ranges Exercise empty ranges at interior and CRLF boundaries using real text layouts, and retain checks for completed-line geometry and existing negative-range behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Handle empty ranges in TextLayout hit testing Return empty geometry for zero-length requests and stop traversing lines when the remaining range is empty. Keep negative-range behavior and TextLine validation unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add direct TextLine empty range regressions Expect no text bounds for zero-length ranges at caret and CRLF line boundaries. Retain checks for normal nonempty geometry. Before the fix, the TextLine suite has 8 failures and 81 passes, with all failures throwing for textLength = 0. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Return no text bounds for empty ranges Handle zero-length ranges in TextLineImpl.GetTextBounds so all consumers share the empty bounds contract. Remove the TextLayout-only guards and document the result. Negative-length behavior is unchanged. Verified 168 passing TextLine/TextLayout tests, with one existing profiling test skipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: adirh <27368554+adirh3@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> |
1 month ago |
|
|
17350180c3
|
Fix Geometry HitTest not finding 0-stroke geometries (#22362)
* geometry hittest - remove fallback client pen and add fallback for null or 0-thickness pen. * add test |
2 months ago |
|
|
817259c592
|
Revert "Fix StreamGeometry Clone and Open when a Transform is set (#22213)" (#22294)
This reverts commit
|
2 months ago |
|
|
8f9ae01905
|
Drive Win32 composition effects from RenderTargetSceneInfo on the render thread (#22114)
* Drive Win32 composition effects from RenderTargetSceneInfo on the render thread Adds an opaque CompositionTarget.TopLevelSpecificSceneInfo bag (with the corresponding ITopLevelImpl property and changed callback) that travels through the composition transport and arrives in RenderTargetSceneInfo. The Win32 backend publishes the theme variant through it. The WinUI/DComp composited window render targets now apply blur/mica visual state in BeginDraw, based on the transparency level and theme variant from the scene info, inside the same transaction as the frame. The UI-thread ICompositionEffectsSurface.SetBlur path is removed, so effect changes can no longer race the render thread and produce frames with mismatched alpha mode and blur state. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TrfgSxPjyUvvKsAPFZoLR1 * Our api diff system leaves much to be desired... * Rename TopLevelSpecificSceneInfo to PlatformSpecificSceneInfo and document RenderTargetSceneInfo Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
2 months ago |
|
|
dff6a87665
|
[OpenGL] Add dma-buf external image import to the EGL backend (#21611)
* Add support for EglExternalObjectsFeature, Fix conflicts * Move inside context * Clank a demo * Add SupportedDmaBufFormats * Use an aux class * EglExternalObjectsFeature.Drm * VulkanDmaBufImage --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
2 months ago |
|
|
88a8bbf8ed
|
Update geometry hit testing to consider stroke region of target geometries. (#22231)
* add 1 line test * update headless geometry hit tests to handle lines * add tests * fix fill intersection calcs * apply review changes * Remove stroke thickness adjustment in HitTestRectangle Removed stroke thickness adjustment calculation from HitTestRectangle method. |
2 months ago |
|
|
8797083b36
|
Yield from dispatcher more eagerly during shutdown (#22240)
|
2 months ago |
|
|
1b286d1261
|
Add built-in theme tests and fix several bugs found by them (#22216)
* Init Avalonia.Themes.UnitTests.csproj, add first tests
* All XAML files should be internal in our themes
* Run proper headless unit test application in Themes tests
* Add ControlThemeTests
* Fix missing resource definitions
* Add Should_Not_Define_Setters_With_Hardcoded_Brushes_Or_Colors test
* Add Should_Define_All_Requested_Template_Parts test
* Update control theme tests to include resolved template parts and their setters
* Whitespace string resource was in fact ignored, use non-breaking space
* Move NavigationBarShadowBackground to the dynamic resource, instead of hardcoding
* Also validate that no BoxShadow is hardcoded - fix existing issues
* Update Should_Not_Include_Any_Reachable_Xaml_Files doc
* Add Should_Define_Identical_Keys_In_ThemeDictionaries and fix existing issues
* Add [Trait] to group theme tests
* Add missing build.cs RunCoreTest("Avalonia.Themes.UnitTests")
* EnumerateTemplateChildren should respect window decoration templates, fix existing issues
* Adjust ControlThemeTests to also check nested style templates, and fix existing issues
* Add API suppressions for XamlX generated types (unreachable by the C#)
* Make sure that empty collections are not passed as green
|
2 months ago |
|
|
ee51cc40c7
|
Fix StreamGeometry Clone and Open when a Transform is set (#22213)
* Fix StreamGeometry Clone and Open when a Transform is set Clone() and Open() cast PlatformImpl to IStreamGeometryImpl, but once Transform is set PlatformImpl is a transformed wrapper, so both threw. Use the stream itself instead, and keep the Transform on the clone. The transformed wrapper copies the path when it is created, so after Open() it would keep showing the old content. Invalidate the geometry when the context is disposed if a transform is set. * Remove the Open() refresh from StreamGeometry Refreshing a transformed geometry after Open() works around a Skia backend bug that is being fixed separately, so this PR only fixes Clone() and Open() throwing when a Transform is set. |
2 months ago |
|
|
ac7c57a1bc
|
[X11] Implement support for PRIMARY selection (#21849)
* [X11] Implement support for PRIMARY selection * Compile * Replace TopLevel.PrimarySelection with TryGetClipboard(ClipboardType) * Address review: reuse GetSelectionRange, X11-only doc comment * Access each property only once in `GetSelectionRange` * Return Task from PublishText --------- Co-authored-by: Julien Lebosquain <julien@lebosquain.net> |
2 months ago |