skia/skia/9146cb0a1d3653a88d2c02064a705a2a3b85859a [fontconfig] Add unit tests for SkFontMgr_fontconfig_priv::remove_weak
Adds unit tests for SkFontMgr_fontconfig_priv::remove_weak in FontMgrFontConfigTest.cpp.
remove_weak strips any trailing weak binding elements after the last strong element for a given object (e.g. FC_FAMILY, FC_POSTSCRIPT_NAME), while leaving patterns with all-weak or all-strong elements intact.
Tested scenarios include:
* Empty patterns and single element patterns (strong and weak)
* Patterns with only strong or only weak elements
* Patterns with strong followed by weak elements (single and multiple)
* Patterns with weak elements preceding strong elements (preserved)
* Complex interspersed strong and weak elements
* Object targeting (FC_POSTSCRIPT_NAME vs FC_FAMILY) and non-string attribute preservation
(FC_SLANT, FC_WEIGHT)
Change-Id: I5357fbc02a2051c841f195531a67f5a7fe2ebb7d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1346836
Reviewed-by: Florin Malita <fmalita@google.com>
Commit-Queue: Alexis Cruz-Ayala <alexisdavidc@google.com>
5 files changed