Add read-only Caption.font getter; addresses #320
The Caption class docstring listed `font` under its Attributes, but no getter
existed -- the PyUICaptionObject.font slot was GC-managed yet never populated by
init(). Wire it up:
- init() now stores the supplied Font (incref) or, when none/None was given, a
wrapper around the engine default font, so the getter reflects what is
actually rendered rather than returning None.
- New read-only `font` getset (consistent with Sprite.texture being read-only).
Regenerated API docs/stubs/man page and rebaselined the api-surface snapshot
(one added line: Caption `prop font: Font (ro)`). Frozen docstring gate 100%,
suite 297/297.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KnywUddaFRhkxo5kijxJnv
This commit is contained in:
parent
5eecb2b2b0
commit
ab6aecd0b0
9 changed files with 47 additions and 10 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# McRogueFace API Reference
|
||||
|
||||
*Generated on 2026-06-21 10:11:50*
|
||||
*Generated on 2026-06-21 12:15:59*
|
||||
|
||||
*This documentation was dynamically generated from the compiled module.*
|
||||
|
||||
|
|
@ -871,6 +871,7 @@ Attributes:
|
|||
- `align`: Alignment relative to parent bounds (Alignment enum or None). When set, position is automatically calculated when parent is assigned or resized. Set to None to disable alignment and use manual positioning.
|
||||
- `bounds` *(read-only)*: Axis-aligned bounding box (tuple, read-only) as a (pos, size) pair of Vectors: (Vector(x, y), Vector(width, height)).
|
||||
- `fill_color`: Fill color of the text (Color). Returns a copy; modifying components requires reassignment. For animation, use 'fill_color.r', 'fill_color.g', etc.
|
||||
- `font` *(read-only)*: Font used for text rendering (Font, read-only). Reflects the engine default font when none was provided at construction.
|
||||
- `font_size`: Font size in points (int). Clamped to the range [0, 65535].
|
||||
- `global_bounds` *(read-only)*: Axis-aligned bounding box in screen coordinates (tuple, read-only) as a (pos, size) pair of Vectors: (Vector(x, y), Vector(width, height)).
|
||||
- `global_position` *(read-only)*: Global screen position (read-only). Calculates absolute position by walking up the parent chain.
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@
|
|||
<body>
|
||||
<div class="container">
|
||||
<h1>McRogueFace API Reference</h1>
|
||||
<p><em>Generated on 2026-06-21 10:11:50</em></p>
|
||||
<p><em>Generated on 2026-06-21 12:15:59</em></p>
|
||||
<p><em>This documentation was dynamically generated from the compiled module.</em></p>
|
||||
|
||||
<div class="toc">
|
||||
|
|
@ -1006,6 +1006,7 @@ Attributes:
|
|||
<li><span class='property-name'>align</span>: Alignment relative to parent bounds (Alignment enum or None). When set, position is automatically calculated when parent is assigned or resized. Set to None to disable alignment and use manual positioning.</li>
|
||||
<li><span class='property-name'>bounds</span> (read-only): Axis-aligned bounding box (tuple, read-only) as a (pos, size) pair of Vectors: (Vector(x, y), Vector(width, height)).</li>
|
||||
<li><span class='property-name'>fill_color</span>: Fill color of the text (Color). Returns a copy; modifying components requires reassignment. For animation, use 'fill_color.r', 'fill_color.g', etc.</li>
|
||||
<li><span class='property-name'>font</span> (read-only): Font used for text rendering (Font, read-only). Reflects the engine default font when none was provided at construction.</li>
|
||||
<li><span class='property-name'>font_size</span>: Font size in points (int). Clamped to the range [0, 65535].</li>
|
||||
<li><span class='property-name'>global_bounds</span> (read-only): Axis-aligned bounding box in screen coordinates (tuple, read-only) as a (pos, size) pair of Vectors: (Vector(x, y), Vector(width, height)).</li>
|
||||
<li><span class='property-name'>global_position</span> (read-only): Global screen position (read-only). Calculates absolute position by walking up the parent chain.</li>
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@
|
|||
. ftr VB CB
|
||||
. ftr VBI CBI
|
||||
.\}
|
||||
.TH "MCRFPY" "3" "2026-06-21" "McRogueFace 0.2.7-prerelease-7drl2026-108-g2654253" ""
|
||||
.TH "MCRFPY" "3" "2026-06-21" "McRogueFace 0.2.7-prerelease-7drl2026-112-g5eecb2b" ""
|
||||
.hy
|
||||
.SH McRogueFace API Reference
|
||||
.PP
|
||||
\f[I]Generated on 2026-06-21 10:11:50\f[R]
|
||||
\f[I]Generated on 2026-06-21 12:15:59\f[R]
|
||||
.PP
|
||||
\f[I]This documentation was dynamically generated from the compiled
|
||||
module.\f[R]
|
||||
|
|
@ -982,6 +982,9 @@ Vector(width, height)).
|
|||
- \f[V]fill_color\f[R]: Fill color of the text (Color).
|
||||
Returns a copy; modifying components requires reassignment.
|
||||
For animation, use `fill_color.r', `fill_color.g', etc.
|
||||
- \f[V]font\f[R] \f[I](read-only)\f[R]: Font used for text rendering
|
||||
(Font, read-only).
|
||||
Reflects the engine default font when none was provided at construction.
|
||||
- \f[V]font_size\f[R]: Font size in points (int).
|
||||
Clamped to the range [0, 65535].
|
||||
- \f[V]global_bounds\f[R] \f[I](read-only)\f[R]: Axis-aligned bounding
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue