Skip to content

v2.1

Compare
Choose a tag to compare
@mta452 mta452 released this 01 Apr 07:15
· 784 commits to master since this release
ff5625f

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