Releases: Tehreer/Tehreer-Cocoa
Releases · Tehreer/Tehreer-Cocoa
v3.0
v2.5
v2.4
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
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
v2.1
v2.0
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
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