~jaro/balkon

ref: a8353aec15f381ae373f30c69d76962fdec99e5e balkon/CHANGELOG.md -rw-r--r-- 6.0 KiB
a8353aecJaro Test struts on paragraph with offset middle box. 1 year, 4 months ago

#Revision history for Balkón

#1.3.0.0 -- TBD

  • Added options for vertical box alignment: line top, line bottom, baseline with optional offset.

    • For backwards compatibility, line top alignment remains the default. Consider updating your code to use baseline alignment instead.
  • Added paragraphLines to the rich text ParagraphLayout. This describes the dimensions of each line of wrapped text, including situations when the line contains more space than what is necessary to contain its fragments. This new field must be passed to pagination.

  • The width of a rich text ParagraphLayout will now remain unchanged after pagination.

  • Lines will now be sized to fit all ancestor boxes of all fragments on the line, as well as the root box, even if some of those boxes do not directly contain any text. Each box effectively contains an invisible "strut", which is required by CSS.

  • Added options to override text ascender and descender metrics.

#1.2.0.0 -- 2023-06-28

  • Added options for horizontal paragraph alignment: start, end, left, right, centre.

    • For backwards compatibility, left alignment remains the default. Consider updating your code to use start alignment instead.
  • Added option to prevent making boxes invisible when they contain no glyphs and no forced (hard) line breaks.

  • Added fragmentContentRect to provide a popular (though unstandardised) way of determining the content area of inline elements.

  • Added function paragraphSafeWidth to help calculating max-content width for CSS.

  • Trimmed white space at the beginning and end of lines may now generate fragments with zero glyphs, to more closely match CSS behaviour. These fragments may affect line height and/or the start edge of boxes.

  • Text will now overflow the end edge of the paragraph according to the text direction of the root box, instead of always overflowing the right edge.

  • Fixed a bug where only the height of the shortest fragment on a line would be considered when positioning the following line.

  • Removed paragraphLineHeight from the rich text interface after it was included by mistake. Rich text needs to use textLineHeight instead.

  • Exposed functions for calculating rectangle unions.

#1.1.0.0 -- 2023-05-31

  • Updated support for bidirectional text:

    • Implemented correct order of directional runs for paragraphs whose base direction is RTL.

    • Numbers now create an implicit LTR embedding level.

    • The direction of weak directional characters and neutral characters is now determined by the embedding level of surrounding characters, or if that does not match, by the base paragraph direction.

    • For the legacy plain text interface, base paragraph direction is now set according to the first strong character.

    • Shaping uses the base paragraph direction when no strongly directional characters are present.

#1.0.0.1 -- 2023-05-18

  • Added another test with "shaped runs" format to allow manual testing of pagination.

#1.0.0.0 -- 2023-05-15

  • Added new Data.Text.ParagraphLayout.Rich interface to support rich text.

    • Supports multiple fonts in the same paragraph. Where line height varies, text will be aligned by its top edge.

    • Supports nested boxes, each with optional spacing applied to its left and right edge.

    • Requires user to set base text direction (LTR or RTL).

  • Moved existing plain text interface into Data.Text.ParagraphLayout.Plain submodule and marked it as deprecated.

  • Marked Data.Text.ParagraphLayout.ParagraphConstruction as deprecated.

  • Input text spans can now have arbitrary user data attached to them. All related data types (Paragraph, Span, Fragment, SpanLayout, ParagraphLayout) have been extended with a type variable.

  • Future-proofed ParagraphOptions and SpanOptions by hiding their constructors. Use defaultParagraphOptions and defaultSpanOptions instead.

  • Added line numbers to laid out fragments.

  • Added information about ancestor boxes of laid out fragments. The plain text interface implicitly generates one box per span, while the rich text interface gives the user direct control over the box hierarchy.

  • Increased font size for the "shaped runs" output so that it better fits a window with 640 pixels of width.

  • Fixed compatibility with base < 4.15.

#0.3.0.0 -- 2023-04-13

  • Added partial support for bidirectional text (LTR and RTL in the same paragraph).

    • The paragraph direction is assumed to be LTR. This will be configurable in a future interface.

    • Only strong directional characters are used to determine text direction.

    • The direction of weak directional characters and neutral characters is determined by the nearest preceding strong directional character, or if none is found, the nearest following strong directional character.

    • Explicit bidirectional formatting characters are ignored.

  • Exposed functions to allow verification of correct input text slicing: paragraphSpanBounds, paragraphSpanTexts, and paragraphText.

#0.2.1.0 -- 2023-04-04

  • Added pagination.

#0.2.0.0 -- 2023-03-28

  • Added support for forced (hard) line breaks in the input text.

  • Now also trimming white space at the beginning of lines.

  • Internally, language tags will be cut at the first invalid character before being passed to ICU.

  • Tests will generate output in "shaped runs" format which can be passed to a text rendering application.

#0.1.0.0 -- 2023-03-13

  • Text shaping using HarfBuzz.

  • Breaking text on line and character boundaries using the International Components for Unicode (ICU) library.

  • Trimming white space at the end of lines.

  • Calculation of containing block bounds and fragment bounds.

  • Support for plain text (single font and line height) in one horizontal direction (LTR or RTL).

  • Input can be divided into spans. This division will be preserved in the output.

  • Each span can use a different language for text shaping and line breaking.