Skip to content

Change PDF text import to use the 'dx' and 'dy' attributes.

Tavmjong Bah requested to merge Tavmjong/inkscape:pdf_import_dx_dy into 1.4.x

This replaces the use of 'x' and 'y' attributes to position individual glyphs. It allows the user to edit the imported text without overwriting other characters.

Also changed:

  • Update the "expected" files for PDF text import tests.

  • Separate out code that creates elements from code that creates elements. There is little overlap between the two paths and having them in the same function made the code overly complicated and difficult to follow.

  • Make FontData::getSpecification() return a more complete specification and use that to determine if the font style has changed. Also change the 'font_specification' variable to use a std::string. This reduces the number of s created.

  • Create a new line of text () if the there is a shift of more than 0.1 of the font size.

  • Set text direction on element (if vertical).

  • Fix vertical PDF text placement.

  • Fix lambda capture for C++20.

Fixes #297 See also: #4864

Edited by Tavmjong Bah

Merge request reports