Repository navigation
Conversation
…ertical The three calls draw a glyph from sceFontGenerateCharGlyph as its font draws the same character with sceFontRenderCharGlyphImage and its Horizontal and Vertical forms, at the pixel scale the glyph was generated with. A style frame on the surface, then the one passed in, override the scale and add slant and weight. The renderer passed in is checked and need not be bound to the font. The signatures follow SharpProspero; the model is recorded in the libSceFont technical debt. RenderCharGlyphImageCore keeps its checks and now draws through RenderCharGlyphImageStyled with an explicit style, and the style frame fields move from ResolveSurfaceStyleState to ApplyStyleFrame. The font fixture accepts glyf and loca tables, and guest_font renders a square glyph to compare the glyph calls with the character calls pixel for pixel.
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
Contributor
Author
|
Closing: this is the same set of calls as #2150, which was closed because no title is known to reach |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements
sceFontGlyphRenderImage,sceFontGlyphRenderImageHorizontalandsceFontGlyphRenderImageVertical(libSceFont, +3 implemented functions).sceFontGenerateCharGlyphis drawn as its font draws the same character withsceFontRenderCharGlyphImageand its Horizontal and Vertical forms, at the pixel scale the glyph was generated with rather than the font's render scale. A style frame on the surface, then the one passed in, override that scale and add their slant and weight.SCE_FONT_ERROR_INVALID_RENDERER) and need not be bound to the font. Deleted or foreign glyphs, invalid style frames, null outputs and glyphs whose font was closed return the codes the library's other glyph and render calls return.RenderCharGlyphImageCorekeeps its checks and now draws throughRenderCharGlyphImageStyled, which takes an explicit style; the style frame fields move fromResolveSurfaceStyleStatetoApplyStyleFrame. Existing behaviour is unchanged.cellFontGlyphRenderImageleave them unimplemented. The model and the unconfirmed parts are recorded indocs/dev/debt/libSceFont.md.FontFixture::BuildFontnow acceptsglyfandlocatables, soguest_fontcan open a font with a real square glyph. No test in the repository rendered a glyph before.Overlap: #6581 also changes
Render.cppandGuestFont.cpp, in other functions (glyph attributes); whichever lands second has a trivial rebase.Tested
Linux (Ubuntu, GCC 15.2.0, Release,
BUILD_TESTING=ON):guest_fontcompares each glyph call with the matching character call pixel for pixel, with metrics and update rectangle, with and without a style frame, on the surface and passed in, plus the error paths. Removing the glyph scale or the passed-in frame from the implementation makes it fail.guest_font,guest_system_font,guest_font_writing_line,font_face_lifetime*) pass. Full suite: the only failures areagc_driver_image_table_vouched_lookupsandagc_driver_pixel_sample_iteration, which fail the same way onmainon this machine (AMD Radeon Vega iGPU, RADV) and do not involve libSceFont.tools/progress.py --compare: libraries 91.51% → 91.59%, +3 implemented.tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)