Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.3.0 conformance #406

Closed
wants to merge 174 commits into from
Closed

Conversation

msand
Copy link
Collaborator

@msand msand commented Jul 17, 2017

I've done quite a bit of work to improve the svg specification conformance of the implementation, using the svg 1.1, tiny, and 2.0 specs, and chrome as reference implementation, using godadddy/svgs to compare results of various test cases. I haven't made any of the corresponding fixes for ios yet, but think it might be a good time to merge these into master. Or what do you think?

ssssssssssss and others added 30 commits June 5, 2017 16:54
…ale, skewX, skewY and matrix. Keep in mind that the current implementation doesn't support 3-arguments rotate(a, x, y) transform yet.
Add conditional translation.preConcat(mMatrix) statement
Correct glyph point and delta x / y calculation and context handling.
Remove incorrect whitespace from getLinePath method call.
Correct the y coordinate of the text's origin when rendering glyphs into paths using getTextPath.
Remove strange postTranslate transform.

https://www.w3.org/TR/SVG11/text.html#TextOnAPath
Clear dx if x or dy if y is set in a GlyphContext.
Make glyph preTranslate by dy instead of postTranslate.
Scale glyph delta correctly.
Set paint flags for anti-alias, kerning for text, subpixel positioning of text.
Add half of width of glyph to distance calculation for mBezierTransformer.getTransformAtDistance and preTranslate the glyph corresponding amount backwards (gives correct angles on glyphs when rendering text on a path)
Add magical constant ratios of 1.2 into getBezierTransformer and getGlyphPointFromContext calls (should probably be based on some dpi ratio calculation)
…nt of if it is wrapped by a G element or not
Remove magic constants.
Implement canvas.drawTextOnPath for reference comparison.
Refactor PathShadowNode and BezierTransformer, expose getPath and getmStartOffset, implement inefficient but accurate enough getTotalDistance for debugging/diagnostics purposes.
‘kerning’ indicates whether the user agent should adjust inter-glyph spacing based on kerning tables that are included in the relevant font (i.e., enable auto-kerning) or instead disable auto-kerning and instead set inter-character spacing to a specific length (typically, zero).

https://www.w3.org/TR/SVG/text.html#SpacingProperties
https://www.w3.org/TR/SVG/text.html#KerningProperty
…Shift, startOffset.

Add method and spacing attributes to textPath.
Correct startOffset calculation.
Implement method="stretch".
Implement support for fontSize value without unit identifier, processed as height value in the current user coordinate system.
https://www.w3.org/TR/SVG11/text.html#FontSizeProperty
# Conflicts:
#	lib/extract/extractViewBox.js
#	package.json
@GeeWee
Copy link

GeeWee commented Aug 2, 2017

I don't have anything to do with the project - I just want to say this looks like really awesome work.

msand added 11 commits August 3, 2017 21:35
Typographic ligature: In writing and typography, a ligature occurs where two or more graphemes or letters are joined as a single glyph.
Optimize kerning and advance widths calculation using Paint.getTextWidths(String text, float[] widths);
Make strokeWidth numberProp instead of string.
Fix caching of AlignmentBaseline.
Rename distance to pathLength.
Upgrade gradle build tools.
Set SDK version to latest stable with available sources.
Support units and percentages with whitespace separated and/or (possibly white-space surrounded) comma separated length lists.
When the effective letter-spacing between two characters is not zero
(due to either justification or non-zero computed ‘letter-spacing’),
user agents should not apply optional ligatures.
https://www.w3.org/TR/css-text-3/#letter-spacing-property
Transverse Box Alignment, specifies how an inline-level box is aligned within the line, and by how much the box is shifted up from its alignment point.
 https://drafts.csswg.org/css-inline/#propdef-vertical-align
 https://www.w3.org/TR/css-inline-3/#propdef-baseline-shift
 https://www.w3.org/TR/css-inline-3/#transverse-alignment
# Conflicts:
#	elements/TextPath.js
#	lib/extract/extractViewBox.js
@msand msand mentioned this pull request Aug 4, 2017
@msand
Copy link
Collaborator Author

msand commented Aug 7, 2017

I intend to implement this still before starting/meanwhile porting to obj-c:
https://drafts.csswg.org/css-fonts-3/#font-rend-desc

…ngs, sub-/super- script baseline-shift.

Activate OpenType localized forms and features required for proper display of composed characters and marks.
@msand
Copy link
Collaborator Author

msand commented Aug 7, 2017

Alright, now Low-level font feature settings control: the font-feature-settings property is done, http://dev.w3.org/csswg/css-fonts/#propdef-font-feature-settings

Ready for porting to ios, it is essentially feature complete at this point.

@msand
Copy link
Collaborator Author

msand commented Aug 7, 2017

@magicismight Have you had any time to look at this?

@msand
Copy link
Collaborator Author

msand commented Aug 24, 2017

@GeeWee Check out #430
It has almost all the fixes from android ported to ios now.
npm i -s react-native-svg@https://github.com/msand/react-native-svg.git#13d5157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants