Commit Graph

289 Commits

Author SHA1 Message Date
Mikael Sand
31c137ca40 Commit missing files. 2018-02-03 23:22:21 +02:00
Mikael Sand
1c12e4bd04 Align SDK and gradle with react-native init
Remove com.android.support:appcompat-v7 dependency (less version issues)
Copy PaintCompat.hasGlyph implementation verbatim.
It is the only really needed part.

Minimize issues for beginners and make first experience maximally smooth
2018-02-03 20:52:49 +02:00
Mikael Sand
a77d104a51 Fix linting and gradle 3.0.1 compatibility 2018-01-19 17:53:08 +02:00
Mikael Sand
60fdf93ec2 Merge pull request #575 from glacjay/patch-1
fix an "out of range" error
2018-01-17 21:28:34 +02:00
GlacJAY
218b4cf610 fix an "out of range" error
The half of a char in java has a range of [0, 255], so the array's length should be 256.
2018-01-17 15:33:54 +08:00
Mikael Sand
84beda169c Fix image rendering and ligature advance on android 2018-01-05 01:48:19 +02:00
Mikael Sand
ec2a967592 Implement getAlignmentBaseline and getBaselineShift in ios. (#527)
* Implement correct transform parser

* Implement getAlignmentBaseline and getBaselineShift in ios.
Add comments to glyphcontext and align with android.
Implement correct isWordSeparator predicate.
Cleanup GlyphContext j2objc remnants.

* Fix getBaselineShift bugs and font data invalidation.
2017-12-16 08:57:53 -08:00
Jeremy Smereka
7ddbf2a73b Fixes Android Release images not rendering (Issue #129) (#514)
* Fixes Android Release images not rendering (Issue #129) (#1)

* Fixes Android Release images not rendering (Issue #129)

Issue caused by 2 things:

- Image resources were not properly getting the path due to missing scheme (if required via require('./images/img.png'))
- markUpdated() was not causing a re-render thus image was not updating if it was a resource id after fetching. This is been changed to directly call bitmapTryRender, however, this may not be the best approach to this issue.

Minor note: After making this change, RenderableShadowNode would get a null for images. I put a null check for the alpha parameter to suppress this.

* Reverts check for color work around
2017-11-30 13:32:17 -08:00
Hem Brahmbhatt
20ea2d9bb5 Upgrade build tools (#492) 2017-11-23 13:48:31 -08:00
Horcrux
7474c90957 Fix image render 2017-11-08 12:25:39 +08:00
magicismight
c51ebd4976 Merge branch '6.0.0' of https://github.com/msand/react-native-svg into 6.0.0 2017-09-24 16:04:50 +08:00
magicismight
2062c4ffb4 Merge branch 'master' of https://github.com/psivanov/react-native-svg into 6.0.0 2017-09-24 16:03:29 +08:00
Petar Ivanov
a2c1e0e4f3 fix broken multi touch for Android (#432) 2017-08-16 16:49:43 -07:00
Mikael Sand
68eeb5e6da Improve numberProp and numberArrayProp PropTypes usage.
Implement "normal" relative unit in java.
2017-08-15 13:31:42 +03:00
magicismight
f32800bfbd Refactor getParentTextRoot and getTextRoot method 2017-08-08 15:27:11 +08:00
magicismight
b62c407b41 Hoist node.saveDefinition
Run node.saveDefinition before draw
2017-08-08 13:08:18 +08:00
Mikael Sand
058183c0de Start https://www.w3.org/TR/SVG2/text.html#TextLayoutAlgorithm
To implement support for bidirectional and vertical text etc.
2017-08-08 03:08:30 +03:00
Mikael Sand
7f91c7cc2b DOCFIX
(cherry picked from commit 7a76285)
2017-08-07 19:32:11 +03:00
Mikael Sand
a1b57d3f4f Implement default and required css 3 fonts features, fontFeatureSettings, sub-/super- script baseline-shift.
Activate OpenType localized forms and features required for proper display of composed characters and marks.
2017-08-07 18:26:45 +03:00
Mikael Sand
f603e7191c Use setFontFeatureSettings for disabling all discretionary ligatures while keeping required ligatures (e.g. in Arabic) 2017-08-05 01:18:16 +03:00
Mikael Sand
a97122a994 Initial support for OpenType.js font data/tables/metrics. 2017-08-04 21:17:02 +03:00
Mikael Sand
1ffd195bc2 Remove duplicate createJSModules. 2017-08-04 17:43:34 +03:00
Mikael Sand
cb17db0e88 Merge remote-tracking branch 'upstream/master' into 5.4.0-conformance
# Conflicts:
#	package.json
2017-08-04 17:25:54 +03:00
Mikael Sand
81a832a115 Add missing FontVariantLigatures.java enum file. 2017-08-04 17:10:07 +03:00
Mikael Sand
fe7e8b2b65 Implement baselineShift and verticalAlign (preferred).
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
2017-08-04 16:29:06 +03:00
Mikael Sand
2939584d1b Implement font-variant-ligatures.
https://developer.mozilla.org/en/docs/Web/CSS/font-variant-ligatures
https://www.w3.org/TR/css-fonts-3/#font-variant-ligatures-prop
2017-08-04 14:10:02 +03:00
Mikael Sand
bc54350786 Disable optional ligatures when letterSpacing != 0
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
2017-08-04 05:01:30 +03:00
Mikael Sand
786b5f2375 Implement strokeDasharray correctly.
Support units and percentages with whitespace separated and/or (possibly white-space surrounded) comma separated length lists.
2017-08-04 00:26:00 +03:00
Mikael Sand
b38ae08e9c Add com.android.support:appcompat-v7:25.3.1 to dependencies.
Set SDK version to latest stable with available sources.
2017-08-03 21:46:01 +03:00
Mikael Sand
553c17794e Implement support for multi-letter ligatures.
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.
2017-08-03 21:35:30 +03:00
magicismight
294cda65af Just remove @Override symbol to support both 0.46.0 and 0.47.0 2017-08-03 15:31:11 +08:00
Mikael Sand
8892166ea3 Fix non-/closed subpath start and end of rendering logic. 2017-07-30 23:34:14 +03:00
Mikael Sand
99875d2ad0 Fix last warnings. 2017-07-29 17:50:13 +03:00
Mikael Sand
fbeb7262fd Fix AlignmentBaseline 2017-07-29 16:48:31 +03:00
Mikael Sand
ab6bbd25e9 Implement extending the path beyond its end points with a straight line that is parallel to the tangent at the path at its end point.
Fix lengthAdjust=spacing.
2017-07-29 15:24:23 +03:00
Mikael Sand
3825bbd5c8 Fix startOfRendering calculation. Fix cursor position calculation. Refactor extractStroke strokeWidth handling. 2017-07-29 14:42:37 +03:00
Mikael Sand
36595c91e2 Correct start- and end-point calculation.
Implement lengthAdjust and textLength attribute. Fix start and end rendering cutoff for text-anchor on a path. Refactor extractStroke. Improve docs.
2017-07-27 00:06:46 +03:00
Mikael Sand
fab3afb03a Implement textPath side attribute. Refactor extractStroke. 2017-07-26 21:05:34 +03:00
Mikael Sand
d08103168a Suggest adding a compatibility mid-line rendering attribute to textPath. 2017-07-26 03:51:57 +03:00
Mikael Sand
54efe3ad1e Fix strokeDasharray handling of odd number of length values and the 'none' value. 2017-07-25 21:58:07 +03:00
Mikael Sand
48cfe71aca Implement GlyphPathBag for caching Paths per char, after a applyTextPropertiesToPaint(paint, font)
Path glyph = bag.getOrCreateAndCache(currentChar, current);
2017-07-25 19:46:02 +03:00
Mikael Sand
9e0de800bd Refactor, optimize. 2017-07-25 11:06:01 +03:00
Mikael Sand
d2eb3a6e16 Fix todo comment 2017-07-25 10:19:11 +03:00
Mikael Sand
51f28ce525 Add missing enum file 2017-07-25 10:16:58 +03:00
Mikael Sand
2d699b4e56 Add alignment-baseline aliases to support legacy content. 2017-07-25 10:00:32 +03:00
Mikael Sand
b140d673d7 Fix interpretation of alignmentBaseline (Shouldn't inherit). 2017-07-25 08:22:56 +03:00
Mikael Sand
c05c215496 Implement prop extraction for side and alignmentBaseline. Cleanup extractText, fix linting. 2017-07-25 07:45:08 +03:00
Mikael Sand
7cafe835df First alignmentBaseline implementation attempt 2017-07-25 07:04:12 +03:00
Mikael Sand
957174e3e7 Begin alignmentBaseline implementation 2017-07-25 05:50:21 +03:00
Mikael Sand
4cfdfd9bf2 Restructure 2017-07-25 03:08:19 +03:00