Issue #9987: text related functions crash using string for font name.

- Fonctions were renamed: s/gimp_text_fontname/gimp_text_font/ and
  s/gimp_text_get_extents_fontname/gimp_text_get_extents_font/
- The size_type arguments were removed. Even in 2.10, this argument was marked
  as "dead" and ignored. It was only kept for API compatibility.
- The font name (string) was replaced by a GimpFont argument.

gimp_text_font() is easily tested in the Python console with:

> Gimp.text_font(Gimp.list_images()[0], None, 10, 40, "Hello World!", 1.0, True, 100, Gimp.context_get_font())

And gimp_text_get_extents_font() with:

> Gimp.text_get_extents_font("Hello World!", 100, Gimp.context_get_font())
This commit is contained in:
Jehan 2023-10-02 20:38:18 +02:00
parent 0a77a8492f
commit 24a85eebd6
8 changed files with 150 additions and 212 deletions

View file

@ -855,8 +855,8 @@ EXPORTS
gimp_smudge
gimp_smudge_default
gimp_temp_file
gimp_text_fontname
gimp_text_get_extents_fontname
gimp_text_font
gimp_text_get_extents_font
gimp_text_layer_get_antialias
gimp_text_layer_get_base_direction
gimp_text_layer_get_by_id