_shadow_alpha() measured the distance to the window's bounding rectangle,
so WIN11/WIN7/WINXP shadows still had square corners: the rounded corner
notch stayed unshadowed and the outer iso-alpha lines met at a right
angle.
Measure against the rectangle inset by the window radius instead. The
corner arcs now shape both the notch and the outer falloff, while the
straight edges keep the previous values. Square styles pass r = 0 and
are unchanged.
build_ascii_atlas() used to scale every glyph to fill its cw x ch cell,
so uppercase and lowercase had the same height and narrow shapes such as
i/l/o became solid blobs.
Use one uniform scale ((ch - 2) / units_per_em) for the whole font, keep
the real cap/x-height/descender ratios, and only squeeze glyphs whose ink
is wider than cw - 1. Center by ink width and place the baseline at ch - 4.
vpui.set_text_mode selects:
- TEXT_MODE_DIRECT: vpui imports fonttools, loads /FONTS/FONT.TTF and
builds the 8x16 atlas in-process.
- TEXT_MODE_MANAGED (default): text is queued per frame and drawn by
Explorer through the new DESK_REQ_TEXT request; Explorer uses the same
fonttools atlas.
Remove the fixed VPUI.ATL asset and its loader.
Load /FONTS/VPUI.ATL once per process and alpha-blend its glyphs; keep the built-in 8x16 bitmap as fallback when the atlas is missing or the codepoint is non-ASCII.
When an off-curve run ended on first_on, the walk set cur=first_on and
wrapped past it, repeating the contour and overflowing the edge table.
Break immediately after drawing the closing quadratic.
_pon was never written, so every point was treated as off-curve and all
straight edges/corners were flattened through the quadratic path. Set
_pon from bit 0 of each parsed glyph flag, including repeated flags.
When two consecutive off-curve points were flattened via their midpoint,
the code advanced past the second point, so the following segment was a
line instead of a quadratic through that control. This rounded corners
and deformed glyphs. Advance only to the first control point.
Flatten each quadratic with a segment count derived from
|p0 - 2*p1 + p2| in pixel space, targeting < 0.5 px error. The count
grows with the rendered font size. All-off-curve contours now use
midpoint quadratics instead of polygon edges.
- vpsdk/brotli: Brotli decoder with the static dictionary
- vpsdk/fonttools: TTF/WOFF2 loading, cmap, glyf/composite glyphs and
anti-aliased rasterization
- Apps/FontDemo: render 你好,世界 from a fixed font path
- autostart FontDemo and copy the Brotli dictionary into disk/libs
- build with the fixed ViperC compiler that zero-extends unsigned types
The FADT signature constant was byte-swapped ("FCAP"), so FADT lookup
always failed. Correct it to "FACP".
SLP_TYP is platform-defined and must come from the DSDT _S5 package.
QEMU/OVMF defines _S5 as 0, so the previous hardcoded value 5 never
triggered S5. Parse _S5 and use its SLP_TYPa/SLP_TYPb for PM1a/PM1b.
ExitBootServices failed with EFI_INVALID_PARAMETER because Print ran
after GetMemoryMap, so the console output could change the memory map
and invalidate MapKey. Locate the RSDP and print it before GetMemoryMap.
Pass the firmware ACPI RSDP through boot_info so the kernel can locate
the FADT. Shutdown now writes the S5 sleep type to the PM1a/PM1b control
blocks advertised by the FADT instead of fixed QEMU/Bochs/VirtualBox
ports.
- boot: capture the ACPI 2.0/1.0 RSDP from the UEFI configuration table
- kernel: add platform/acpi; walk RSDP -> RSDT/XSDT -> FADT
- syscall: power_shutdown calls acpi.poweroff()
- REBOOT (0x1008): 8042 reset with PCI 0xCF9 fallback
- SHUTDOWN (0x1009): ACPI S5 writes to the common QEMU/Bochs/VBox
PM1a control ports, then halt
- vpsdk.process.reboot()/shutdown()
- Terminal commands: reboot, shutdown (help updated)
_set_page_writable / MakePTWritable derived table pointers with
entry & ~0xFFF, which keeps reserved bits 52..62 and NX. An invalid
entry (P=1, PS=0, reserved bits set) produced 0xfffffffffffff000 and
a boot-time #PF in _set_page_writable.
Add _table_phys: keep address bits 12..51 and require reserved bits
52..62 to be zero. Use it at every non-leaf level in both walkers.