Tehreer Cocoa Versions Save

Standalone text engine for iOS aimed to be free from platform limitations

v3.0

11 months ago

Updates:

  • Added support for text justification in TTextView
  • Updated FreeType to version 2.13.0
  • Updated HarfBuzz to version 7.3.0
  • Updated SheenBidi to version 2.6
  • Updated UniBreak to version 5.1
  • Minor bug fixes and architectural improvements

v2.5

3 years ago

Updates

  • Added actual code of dependent libraries instead of submodules
  • Updated the project to use HarfBuzz for text shaping

v2.4

3 years ago

Additions

  • Added support for color fonts consisting of COLR / CPAL tables
  • Covered a color font with palettes in demo project
  • Added support for colored and stroked glyphs' caching

Typeface:

  • Palette Entry Names: var paletteEntryNames: [String]
  • Predefined Palettes: var predefinedPalettes: [ColorPalette]
  • Palette Colors: var associatedColors: [UIColor]
  • Color Instance: func colorInstance(forColors colors: [UIColor]) -> Typeface?

TLabel:

  • Rendering Style: fill, fillStroke, stroke
  • Stroke Properties: color, width, cap, join, miter

v2.3

3 years ago

Additions

  • Added support for variable fonts
  • Covered variable fonts in demo project

FontFile:

  • init?(path: String)
  • init?(data: Data)
  • init?(stream: InputStream)

Typeface:

  • init?(data: Data)
  • func variationInstance(forCoordinates coordinates: [CGFloat]) -> Typeface?
  • var isVariable: Bool
  • var variationAxes: [VariationAxis]
  • var variationCoordinates: [CGFloat]

Updates

  • Fixed a bug related to typeface creation from input stream
  • Used dedicated initializers in typeface
  • Fixed weight and width value setting from OS2 table
  • Removed synchronizable protocol

v2.2

3 years ago

Updates

  • Implemented custom text view based on asynchronous operations
  • Presented Surah Al-Kahf with Tajweed rules in demo project
  • Fixed an issue related to text color in glyph run drawing

v2.1

3 years ago

Updates

  • Major bug fix related to bounding box calculation
  • A new custom text view component

v2.0

3 years ago

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

v1.1

4 years ago

Additions

BidiAlgorithm:

  • Paragraph Boundary: paragraphBoundary(inCodeUnitRange: Range<Int>) -> Int
  • Paragraph Creation:
    • makeParagraph(codeUnitRange: Range<Int>, direction: BaseDirection) -> BidiParagraph?
    • makeParagraph(codeUnitRange: Range<Int>, baseLevel: UInt8) -> BidiParagraph?

BidiParagraph:

  • Line Creation: makeLine(codeUnitRange: Range<Int>) -> BidiLine?
  • UTF-16 Range: var codeUnitRange: Range<Int>

BidiLine:

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

BidiRun:

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

BidiPair:

  • Character Index: var characterIndex: String.Index

Typesetter:

  • Line Truncation:
    • func makeTruncatedLine(characterRange: Range<String.Index>, extent: CGFloat, breakMode: BreakMode, truncationPlace: TruncationPlace, tokenString: String?) -> ComposedLine
    • func makeTruncatedLine(characterRange: Range<String.Index>, extent: CGFloat, breakMode: BreakMode, truncationPlace: TruncationPlace, tokenLine: ComposedLine) -> ComposedLine

FrameResolver:

  • Truncation Support:
    • var truncationMode: BreakMode = .line
    • var truncationPlace: TruncationPlace? = nil

TLabel:

  • Hit Testing:
    • func indexOfCodeUnit(at position: CGPoint) -> Int?
    • func indexOfCharacter(at position: CGPoint) -> String.Index?
  • Truncation Support:
    • var truncationMode: BreakMode
    • var truncationPlace: TruncationPlace?
  • Current Frame: var textFrame: ComposedFrame?

Demo Project:

  • Added LinkableLabel in demo project
  • Highlighted links on press in custom label screen

Updates

  • Set access specifier of TLabel to open