Skip to content

Releases: Tehreer/Tehreer-Android

v3.0

31 May 13:41
Compare
Choose a tag to compare

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

15 Mar 05:28
Compare
Choose a tag to compare

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 in ShapingResult to base on CaretEdgesBuilder
  • 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 a TextRun implementation
  • Introduced DefaultTextRunDrawing class for reusing drawing logic in a TextRun implementation
  • Updated IntrinsicRun class to base on AbstractTextRun
  • Removed text drawing support from IntrinsicRun
  • Put ReplacementRun related implementation in its own class
  • Introduced CaretEdges class in IntrinsicRunSlice to transform the edges of parent run
  • Updated draw() method in IntrinsicRunSlice to base on DefaultTextRunDrawing
  • Introduced JustifiedRun class to transform an existing text run into a justified one
  • Added justification support in LineResolver and TextContainer
  • Simplified text frame resolving implementation in FrameResolver

v2.7

17 Oct 04:17
Compare
Choose a tag to compare

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 in Typeface class
  • Removed suppress warnings of Raw Types in LruCache

v2.6

24 Apr 06:50
Compare
Choose a tag to compare

Updates

  • Added actual code of dependent libraries instead of submodules
  • Updated the project to use HarfBuzz for text shaping
  • Major bug fix related to bounding box calculation

v2.5

23 Jan 09:16
Compare
Choose a tag to compare

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

19 Mar 16:10
63568a9
Compare
Choose a tag to compare

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

09 Dec 16:14
b315675
Compare
Choose a tag to compare

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 of NameTable.Record

v2.2

21 Aug 12:29
Compare
Choose a tag to compare

Additions

BidiClass:

GeneralCategory:

Script:

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

01 Apr 07:15
ff5625f
Compare
Choose a tag to compare

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 and TypeSizeSpan conform to MetricAffectingSpan for easier span handling
  • Updated FreeType to version 2.9
  • Updated SheenFigure to version 1.3

Fixes

  • Fixed NullPointerException caused by NameTable on older android versions
  • Fixed gravity attribute of TLabel with flag format
  • Prohibited offsets and advances scaling in Renderer
  • Made accidentally publicized method createCompactLine private in Typesetter

v2.0

30 Jul 15:24
Compare
Choose a tag to compare
  • Refined architecture of the library
  • Added flexible primitive collections
  • Exposed essential SFNT tables
  • Covered more APIs in demo project