Skip to content

Support for vertical text alignment

Compare
Choose a tag to compare
@henrik-dmg henrik-dmg released this 11 Aug 07:09
caff9eb

We’ve been hard working during these hot summer weeks and got another SwiftFrame update for you. You can now specify the horizontal and vertical alignment of text within its bounding boxes.
The alignment key in the config files now requires an object with two sub-keys vertical and horizontal instead of just a string. horizontal still supports all the alignment styles you’re used to from CSS (left, right, justify, etc.) and vertical supports top, center and bottom.
Text rendering apart from the vertical alignment has not changed, so all you need to do to get started with this new version of SwiftFrame is update your config files and CI invocations (see Other Changes section below)

Other Changes

  • --config-path is now an argument rather than an option since it is required to run SwiftFrame, so it made sense to remove this possible source of confusion. You can simply drop the flag and you should be good to go (for additional help call swiftframe --help)
  • SwiftFrame can now generate bash autocompletion scripts (although there is not that much to autocomplete if we’re being honest), for more information see the ArgumentParser documentation
  • Previously we had to subtract a very small number (``1e-7to be exact) from the maximum fitting font size to avoidCoreText` not rendering text correctly. This has been resolved
  • We streamlined a bunch of stuff under the hood to make development on SwiftFrame easier in the future

Binary checksum: 74a08fa35fc4bf86db7d7ae4064386ae8174bd590b93196a1ab0302911ff2beb
(use shasum -a 256 path/to/swiftframe/binary to verify)