Releases: Tehreer/Tehreer-Android
v3.0
Updates:
- Updated Java version to 1.8
- Wrote internal implementation of the library in Kotlin
- Built CI pipeline on GitHub Actions
- Wrote test cases for some classes
- Updated FreeType to version 2.13.0
- Updated HarfBuzz to version 7.3.0
- Updated SheenBidi to version 2.5
- Minor bug fixes and architectural improvements
v2.8
Additions:
- Added seek bar for adjusting justification level in custom text view demo screen
FrameResolver
:
- Justification Support:
setJustificationEnabled(boolean justificationEnabled)
,boolean isJustificationEnabled()
- Justification Level:
setJustificationLevel(float justificationLevel)
,float getJustificationLevel()
Typesetter
:
- Line Justification:
ComposedLine createJustifiedLine(int charStart, int charEnd, float justificationFactor, float justificationWidth)
TTextView
:
- Justification Properties:
justificationEnabled
,justificationLevel
Updates:
- Introduced
CaretEdgesBuilder
class for generating caret edges from a set of input parameters - Updated
getCaretEdges()
method inShapingResult
to base onCaretEdgesBuilder
- Converted
TextRun
from abstract class to an interface - Introduced
AbstractTextRun
class for providing helper implementation of some methods - Introduced
TextRunDrawing
interface for separating drawing logic from aTextRun
implementation - Introduced
DefaultTextRunDrawing
class for reusing drawing logic in aTextRun
implementation - Updated
IntrinsicRun
class to base onAbstractTextRun
- Removed text drawing support from
IntrinsicRun
- Put
ReplacementRun
related implementation in its own class - Introduced
CaretEdges
class inIntrinsicRunSlice
to transform the edges of parent run - Updated
draw()
method inIntrinsicRunSlice
to base onDefaultTextRunDrawing
- Introduced
JustifiedRun
class to transform an existing text run into a justified one - Added justification support in
LineResolver
andTextContainer
- Simplified text frame resolving implementation in
FrameResolver
v2.7
Additions
- A new custom text view component based on ScrollView
- Presented Surah Al-Kahf with Tajweed rules in demo project
- Added variation support in text shaping
- Added support for named styles in typeface
- Added support for caching glyph advances during text shaping
Updates
- Fixed an issue related to default palette selection in
Typeface
- Broke down
Typeface
into multiple classes on JNI side - Introduced
RenderableFace
class for holding FT_Face in JNI - Introduced
ShapableFace
class for holding custom implementation of hb_font in JNI - Used custom mechanism for handling variation coordinates
- Moved variable font description handling to
Java
side - Removed references to
NameTable
inTypeface
class - Removed suppress warnings of Raw Types in
LruCache
v2.6
v2.5
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:
List<String> getPaletteEntryNames()
- Predefined Palettes:
List<ColorPalette> getPredefinedPalettes()
- Palette Colors:
int[] getAssociatedColors()
- Color Instance:
Typeface getColorInstance(int[] colors)
TLabel
:
- Rendering Style:
fill
,fill_stroke
,stroke
- Stroke Properties:
color
,width
,cap
,join
,miter
Updates
- Optimized internal architecture to represent text runs
- Optimized glyph cache for faster access to objects
- Updated free type to version 2.10.4
- Updated sheen bidi to version 2.3
v2.4
Additions
- Added support for variable fonts
- Covered variable fonts in demo project
- Wrote likable label in demo project
FontFile
:
- Named Typefaces:
List<Typeface> getTypefaces()
Typeface
:
- Variation Axes:
List<VariationAxis> getVariationAxes()
- Variation Coordinates:
float[] getVariationCoordinates()
- Variation Instance:
Typeface getVariationInstance(float[] coordinates)
ShapingResult
:
- Caret Edges:
FloatList getCaretEdges(boolean[] caretStops)
Updates
- Added static constructors in table classes
- Used sheen figure for caret handling
- Updated free type to version 2.10.0
v2.3
Additions
Added @Nullable
, @NonNull
, @Size
and @ColorInt
annotations throughout the project
ShapingEngine
:
- OpenType Features:
setOpenTypeFeatures(Set<OpenTypeFeature> features)
,Set<OpenTypeFeature> getOpenTypeFeatures()
Typeface
:
- Strikeout Properties:
int getStrikeoutPosition()
,int getStrikeoutThickness()
@IntDef
Annotations:
BidiClass
:@Value
GeneralCategory
:@Value
Script
:@Value
Updates
- Implemented character measurement based on caret range distance
- Wrote
Precondition
class and used it for checking parameter expectations - Removed custom
@Sustain
annotation in favour of androidx@Keep
annotation - Replaced array with variable args for creating primitive lists
- Updated SheenFigure to version 1.5
Fixes
- Fixed an issue related to text becoming blank in
TLabel
widge - Fixed backward mode glyph run rendering issues
- Fixed backward mode cluster clipping issues
- Fixed
equals(Object)
implementation ofNameTable.Record
v2.2
Additions
BidiClass
:
- Enum Values: UAX #44: Bidirectional Class Values
- Unit Testing: Literal Numbers
GeneralCategory
:
- Enum Values: UAX #44: General Category Values
- Unit Testing: Literal Numbers
Script
:
- Enum Values: UAX #24: PropertyValueAliases.txt
- OpenType Tag:
static int getOpenTypeTag(int script)
- Unit Testing: Literal Numbers
CodePoint
:
- Bidi Class Property:
static int getBidiClass(int codePoint)
- General Category Property:
static int getGeneralCategory(int codePoint)
- Script Property:
static int getScript(int codePoint)
- Mirroring Property:
static int getMirror(int codePoint)
BidiAlgorithm
:
- Bidi Classes:
IntList getCharBidiClasses()
ScriptClassifier
:
- Unicode Standard: UAX #24
- Resolved Scripts:
IntList getCharScripts()
- Resolved Runs:
Iterable<ScriptRun> getScriptRuns(int charStart, int charEnd)
GlyphRun
:
- Cluster Splitting:
int getStartExtraLength()
,int getEndExtraLength()
Added support for cluster splitting in multiple spans
Wrote an abstract class for testing IntList
implementations
Used a dedicated Android.mk
file for instrumentation tests
Updates
- Integrated script analysis process of UAX #24 in typesetting
- Made right-to-left glyph drawing with decreasing pen x value in
Renderer
- Reduced synthetic methods generation with package access
- Enabled JNI symbols stripping in release mode
- Reduced property methods calling in
Renderer
- Used direct field accesses in
GlyphRun
- Shortened names of native methods with
n
prefix - Refactored names of internal primitive collections
- Updated FreeType to version 2.9.1
- Updated SheenBidi to version 2.1
- Updated SheenFigure to version 1.4
Fixes
- Fixed invalid leading and trailing index issues in
GlyphRun
- Fixed accidental deallocation of data in primitive raw list implementations
- Fixed character measurement of backward segments in typesetting
- Fixed cluster map copying issue in
GlyphRun
- Fixed redundant type casting warnings in demo project
v2.1
Additions
TypeFamily
:
- Style Matching:
getTypefaceByStyle(TypeWidth, TypeWeight, TypeSlope)
TypefaceManager
:
- Typeface Grouping:
getTypeFamily(String familyName)
TextAlignment
:
- Natural Alignment:
INTRINSIC
,EXTRINSIC
GlyphRun
:
- Character Group:
int getActualClusterStart(int charIndex)
,int getActualClusterEnd(int charIndex)
- Glyph Group:
int getLeadingGlyphIndex(int charIndex)
,int getTrailingGlyphIndex(int charIndex)
- Hit Testing:
float computeCharDistance(int charIndex)
,int computeNearestCharIndex(float distance)
ComposedLine
:
- Hit Testing:
float computeCharDistance(int charIndex)
,int computeNearestCharIndex(float distance)
- Highlighting:
float[] computeVisualEdges(int charStart, int charEnd)
CompsedFrame
:
- Boundary Properties:
originX
,originY
,width
,height
- Hit Testing:
int getLineIndexForChar(int charIndex)
,int getLineIndexForPosition(float x, float y)
- Highlighting:
Path generateSelectionPath(int charStart, int charEnd)
TLabel
:
- Line Properties:
extraLineSpacing
,lineHeightMultiplier
- Text Properties:
composedFrame
,spanned
,typesetter
- Hit Testing:
int hitTestPosition(float x, float y)
Added FrameResolver
class for easier text layout and measurement.
Added support for following CharacterStyle
spans without invoking updateDrawState(TextPaint)
or updateMeasureState(TextPaint)
:
- ForegroundColorSpan
- AbsoluteSizeSpan
- RelativeSizeSpan
- ReplacementSpan
- ScaleXSpan
- StyleSpan
- SubscriptSpan
- SuperscriptSpan
- TextAppearanceSpan
- TypefaceSpan
Added support for following ParagraphStyle
spans:
- AlignmentSpan
- BulletSpan
- LeadingMarginSpan
- LeadingMarginSpan2
- LineBackgroundSpan
- LineHeightSpan
- QuoteSpan
Updates
- Divided functionality of
Typesetter
into various logical classes - Made
TypefaceSpan
andTypeSizeSpan
conform toMetricAffectingSpan
for easier span handling - Updated FreeType to version 2.9
- Updated SheenFigure to version 1.3
Fixes
- Fixed
NullPointerException
caused byNameTable
on older android versions - Fixed
gravity
attribute ofTLabel
with flag format - Prohibited offsets and advances scaling in
Renderer
- Made accidentally publicized method
createCompactLine
private inTypesetter