Sets the variation position of the SkTypeface on th hb_font. This allows
for correct shaping of variation fonts. This also splits out the
creation of hb_font from SkTypeface for clarity.
Change-Id: I8e3476dea0f18f1f7cb3fe757a04f99f0ab6c0fe
Reviewed-on: https://skia-review.googlesource.com/41742
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
The ubidi code only works with utf16 and SkTextBlob only with utf8. This
requires translating indexes. The current code starts cold when
translating indexes for each run, leading to taking O(n^2) time on the
number of runs. However, since this code is iterating over the runs in
order and each run begins where the last left off, simply keeping the
previous run's utf8 and utf16 end positions and using them as the next
starting position makes this O(N).
Change-Id: I921a87511fb4cdf5f6e92cd483959cf758d95306
Reviewed-on: https://skia-review.googlesource.com/41503
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>