Skip to content

v2.0

Compare
Choose a tag to compare
@mta452 mta452 released this 01 Feb 14:51
· 178 commits to master since this release

Additions

ComposedFrame:

  • UTF-16 Variants:
    • var codeUnitRange: Range<Int>
    • func indexOfLine(forCodeUnitAt index: Int) -> Int
    • func selectionPath(forCodeUnitRange codeUnitRange: Range<Int>) -> CGPath

ComposedLine:

  • UTF-16 Variants:
    • var codeUnitRange: Range<Int>
    • func distance(forCodeUnitAt index: Int) -> CGFloat
    • func visualEdges(forCodeUnitRange: Range<Int>) -> [CGFloat]
    • func indexOfCodeUnit(at distance: CGFloat) -> Int

FrameResolver:

  • UTF-16 Variant: func makeFrame(codeUnitRange: Range<Int>) -> ComposedFrame?

GlyphRun:

  • UTF-16 Variants:
    • func clusterStart(forCodeUnitAt index: Int) -> Int
    • func clusterEnd(forCodeUnitAt index: Int) -> Int
    • func leadingGlyphIndex(forCodeUnitAt index: Int) -> Int
    • func trailingGlyphIndex(forCodeUnitAt index: Int) -> Int
    • func distance(forCodeUnitAt index: Int) -> CGFloat
    • func indexOfCodeUnit(at distance: CGFloat) -> Int

ScriptClassifier:

  • UTF-16 Variant: func scriptRuns(forCodeUnitRange: Range<Int>) -> RunSequence

ScriptRun:

  • UTF-16 Range: var codeUnitRange: Range<Int>

ShapingEngine:

  • UTF-16 Variant: func shape(string: String, codeUnitRange: Range<Int>) -> ShapingResult

ShapingResult:

  • UTF-16 Range: var codeUnitRange: Range<Int>

Typesetter:

  • UTF-16 Variants:
    • func suggestForwardBreak(inCodeUnitRange: Range<Int>, extent: CGFloat, breakMode: BreakMode)
    • func suggestBackwardBreak(inCodeUnitRange: Range<Int>, extent: CGFloat, breakMode: BreakMode)
    • func makeSimpleLine(codeUnitRange: Range<Int>) -> ComposedLine
    • func makeTruncatedLine(codeUnitRange: Range<Int>, extent: CGFloat, breakMode: BreakMode, truncationPlace: TruncationPlace, tokenString: String?) -> ComposedLine
    • func makeTruncatedLine(codeUnitRange: Range<Int>, extent: CGFloat, breakMode: BreakMode, truncationPlace: TruncationPlace, tokenLine: ComposedLine) -> ComposedLine

Updates

  • Aggressive optimizations to internal algorithms based on UTF-16 indexes
  • Used CGLayer for glyph rendering
  • Updated sheen bidi to version 2.3