Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[MNT]: Add more tests forFT2Font.load_char #27115

Open
@story645

Description

@story645

Summary

In#26989 I could remove the lines warning that a glyph was missing without breaking any tests:

bool was_found =load_char_with_fallback(ft_object_with_glyph, final_glyph_index, glyphs, char_to_font,
glyph_to_font, charcode, flags, charcode_error, glyph_error,true);
if (!was_found) {
ft_glyph_warn(charcode);

}else {
ft_object =this;
FT_UInt glyph_index =ft_get_char_index_or_warn(face, (FT_ULong)charcode);

I didn't remove the warnings cause I don't think we test whatFt2Font.load_char does when given a missing glyph. It's used in three places in the library:

Proposed fix

Minimally, there should be at least two tests of howload_char /the methods calling it handle missing glyphs - mathtext may be a good start. There should be one test for each codepath that triggers a missing glyph error. It would probably also be good to add some more tests for TextPath -> it mostly seems to be tested via gallery examples.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp