Set collection index on fusedArgs in SkTypeface_Fontations::onMakeClone

When cloning an SkTypeface_Fontations with modified variation
coordinates or palette, onMakeClone creates fusedArgs with the merged
coordinates and palette, but omits setting the collection index (TTC
index).

As a result, fusedArgs defaults collectionIndex to 0. When MakeFromData
is called with fusedArgs to instantiate the cloned typeface, it creates
a typeface for index 0 of the TTC instead of the original typeface's TTC
index.

Set fusedArgs.setCollectionIndex(fTtcIndex) so the cloned typeface
preserves the collection index.

Bug: b/558895933
Test: Fontations_CloneVariableCollectionNonNullIndex
Change-Id: I1713e19dc5ae90a4f2e249910c82e2b0f7ca9ec4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1355096
Reviewed-by: Julia Lavrova <jlavrova@google.com>
Commit-Queue: Seigo Nonaka <nona@google.com>
2 files changed