Commit graph

18 commits

Author SHA1 Message Date
a322c06850 Everywhere: Give stbtt its own 32MB static memory pool
At boot time, we preallocate 32MB of RAM to reuse for all malloc()
requests by stbtt_RenderText(), which should be more than enough for the
primary use case (browsing web pages).
2025-04-19 21:01:14 -04:00
b9eb4cb874 System/Libraries/Graphics2D: Alloc c2d wrapper functions off of Adam task's code heap 2025-04-19 16:00:21 -04:00
a15de6eb33 System/Libraries/Graphics2D: Update @get_truetype_text_width() to use @stbtt_GetTextWidth() 2025-04-19 14:18:15 -04:00
546fd54a62 System/Libraries/Graphics2D: Update @get_truetype_text_width() to include advance 2025-04-19 10:42:26 -04:00
e7d8b456aa Everywhere: Update to clang-format 20 2025-04-19 07:31:54 -04:00
24500f52a3 System/Libraries/(Css,Graphics2D,Html): Support underlined text
This commit adds the necessary functions to minimally implement support
for CSS text-decoration: underline.
2025-04-16 14:53:16 -04:00
d60fc53798 System/Libraries/Graphics2D: Chop 16px off X2 max pos in @get_truetype_text_width()
This is a quick and dirty hack to compensate for artifacts at the far
right edge of the font rasterization buffer. Chopping off 16px allows us
to get the proper width of the rasterized text.
2025-04-15 11:45:47 -04:00
df0adc0a15 Everywhere: Changes to @html_dom_node and TrueType API
CSS properties fontFamily and fontSize are part of @html_dom_node now,
and the TrueType API only accepts I32 code point streams, so we have
to preprocess UTF-8 streams before rendering text.
2025-04-12 18:09:26 -04:00
2b8092f418 System/Libraries/Graphics2D: Add @get_truetype_text_width() 2025-04-09 08:59:06 -04:00
a58151430c System/Libraries/Graphics2D: Specify font name for Text2D 2025-04-05 09:21:54 -04:00
e5342de633 System/Libraries/Graphics2D: Add ctx->text() 2025-04-04 20:14:39 -04:00
3de382e6c5 Everywhere: Set default ctx->opacity to -1 2025-04-04 11:14:30 -04:00
a9c623685d System/Libraries/Graphics2D: Add member 'opacity' to Context2D
This is meant to be used for alpha blending in the Compositor, unrelated
to the context's own alpha channel.
2025-04-04 08:23:21 -04:00
5107975a32 System/Libraries/Graphics2D: Use MemCpyU64 for Flip() 2025-03-29 14:54:29 -04:00
19977d3a15 System/Libraries/Graphics2D: Make (most) callable functions chainable 2025-03-27 10:36:27 -04:00
337513fb52 System/Libraries/Graphics2D: Free up callable functions in DelContext2D() 2025-03-26 14:45:37 -04:00
b280ae3501 System/Libraries/Graphics2D: Make Context2D callable 2025-03-25 11:18:07 -04:00
39198164cd Meta: Add files to repository 2025-03-25 07:34:41 -04:00