| 1 |
/* |
| 2 |
* Copyright 2023 Google LLC |
| 3 |
* |
| 4 |
* Use of this source code is governed by a BSD-style license that can be |
| 5 |
* found in the LICENSE file. |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "gm/gm.h" |
| 9 |
#include "include/core/SkBitmap.h" |
| 10 |
#include "include/core/SkCanvas.h" |
| 11 |
#include "include/core/SkData.h" |
| 12 |
#include "include/core/SkFont.h" |
| 13 |
#include "include/core/SkFontTypes.h" |
| 14 |
#include "include/core/SkRefCnt.h" |
| 15 |
#include "include/core/SkStream.h" |
| 16 |
#include "include/core/SkString.h" |
| 17 |
#include "include/core/SkSurface.h" |
| 18 |
#include "include/core/SkSurfaceProps.h" |
| 19 |
#include "include/core/SkTypeface.h" |
| 20 |
#include "include/ports/SkTypeface_fontations.h" |
| 21 |
#include "modules/skshaper/include/SkShaper.h" |
| 22 |
#include "src/core/SkColorPriv.h" |
| 23 |
#include "src/ports/SkTypeface_FreeType.h" |
| 24 |
#include "tools/Resources.h" |
| 25 |
#include "tools/TestFontDataProvider.h" |
| 26 |
|
| 27 |
namespace skiagm { |
| 28 |
|
| 29 |
namespace { |
| 30 |
|
| 31 |
constexpr int kGmWidth = 1000; |
| 32 |
constexpr int kMargin = 30; |
| 33 |
constexpr float kFontSize = 24; |
| 34 |
constexpr float kLangYIncrementScale = 1.9; |
| 35 |
|
| 36 |
/** Compare bitmap A and B, in this case originating from text rendering results with FreeType and |
| 37 |
* Fontations + Skia path rendering, compute individual pixel differences for the rectangles that |
| 38 |
* must match in size. Produce a highlighted difference bitmap, in which any pixel becomes white for |
| 39 |
* which a difference was determined. */ |
| 40 |
void comparePixels(const SkPixmap& pixmapA, |
| 41 |
const SkPixmap& pixmapB, |
| 42 |
SkBitmap* outPixelDiffBitmap, |
| 43 |
SkBitmap* outHighlightDiffBitmap) { |
| 44 |
if (pixmapA.dimensions() != pixmapB.dimensions()) { |
| 45 |
return; |
| 46 |
} |
| 47 |
if (pixmapA.dimensions() != outPixelDiffBitmap->dimensions()) { |
| 48 |
return; |
| 49 |
} |
| 50 |
|
| 51 |
SkISize dimensions = pixmapA.dimensions(); |
| 52 |
for (int32_t x = 0; x < dimensions.fWidth; x++) { |
| 53 |
for (int32_t y = 0; y < dimensions.fHeight; y++) { |
| 54 |
SkColor c0 = pixmapA.getColor(x, y); |
| 55 |
SkColor c1 = pixmapB.getColor(x, y); |
| 56 |
int dr = SkGetPackedR32(c0) - SkGetPackedR32(c1); |
| 57 |
int dg = SkGetPackedG32(c0) - SkGetPackedG32(c1); |
| 58 |
int db = SkGetPackedB32(c0) - SkGetPackedB32(c1); |
| 59 |
|
| 60 |
*(outPixelDiffBitmap->getAddr32(x, y)) = |
| 61 |
SkPackARGB32(0xFF, SkAbs32(dr), SkAbs32(dg), SkAbs32(db)); |
| 62 |
|
| 63 |
if (dr != 0 || dg != 0 || db != 0) { |
| 64 |
*(outHighlightDiffBitmap->getAddr32(x, y)) = SK_ColorWHITE; |
| 65 |
} else { |
| 66 |
*(outHighlightDiffBitmap->getAddr32(x, y)) = SK_ColorBLACK; |
| 67 |
} |
| 68 |
} |
| 69 |
} |
| 70 |
} |
| 71 |
|
| 72 |
} // namespace |
| 73 |
|
| 74 |
class FontationsFtCompareGM : public GM { |
| 75 |
public: |
| 76 |
// See https://issues.skia.org/issues/396360753 |
| 77 |
// We would like Fontations anti-aliasing on a surface with unknown pixel geometry |
| 78 |
// to look like the FreeType backend in order to avoid perceived regressions in |
| 79 |
// contrast/sharpness. Specify unknown geometry for tests that request it. |
| 80 |
enum SimulatePixelGeometry { kLeaveAsIs, kSimulateUnknown }; |
| 81 |
|
| 82 |
FontationsFtCompareGM(std::string testName, |
| 83 |
std::string fontNameFilterRegexp, |
| 84 |
std::string langFilterRegexp, |
| 85 |
SimulatePixelGeometry simulatePixelGeometry, |
| 86 |
SkFontHinting hintingMode = SkFontHinting::kNone) |
| 87 |
: fTestDataIterator(fontNameFilterRegexp, langFilterRegexp) |
| 88 |
, fTestName(testName.c_str()) |
| 89 |
, fSimulatePixelGeometry(simulatePixelGeometry) |
| 90 |
, fHintingMode(hintingMode) { |
| 91 |
this->setBGColor(SK_ColorWHITE); |
| 92 |
} |
| 93 |
|
| 94 |
protected: |
| 95 |
SkString getName() const override { |
| 96 |
SkString testName = SkStringPrintf("fontations_compare_ft_%s", fTestName.c_str()); |
| 97 |
switch (fHintingMode) { |
| 98 |
case SkFontHinting::kNormal: { |
| 99 |
testName.append("_hint_normal"); |
| 100 |
break; |
| 101 |
} |
| 102 |
case SkFontHinting::kSlight: { |
| 103 |
testName.append("_hint_slight"); |
| 104 |
break; |
| 105 |
} |
| 106 |
case SkFontHinting::kFull: { |
| 107 |
testName.append("_hint_full"); |
| 108 |
break; |
| 109 |
} |
| 110 |
case SkFontHinting::kNone: { |
| 111 |
testName.append("_hint_none"); |
| 112 |
break; |
| 113 |
} |
| 114 |
} |
| 115 |
|
| 116 |
if (fSimulatePixelGeometry == SimulatePixelGeometry::kSimulateUnknown) { |
| 117 |
testName.append("_unknown_px_geometry"); |
| 118 |
} |
| 119 |
return testName; |
| 120 |
} |
| 121 |
|
| 122 |
SkISize getISize() override { |
| 123 |
TestFontDataProvider::TestSet testSet; |
| 124 |
fTestDataIterator.rewind(); |
| 125 |
fTestDataIterator.next(&testSet); |
| 126 |
|
| 127 |
return SkISize::Make(kGmWidth, |
| 128 |
testSet.langSamples.size() * kFontSize * kLangYIncrementScale + 100); |
| 129 |
} |
| 130 |
|
| 131 |
void modifySurfaceProps(SkSurfaceProps* props) const override { |
| 132 |
if (fSimulatePixelGeometry == kSimulateUnknown) { |
| 133 |
*props = props->cloneWithPixelGeometry(SkPixelGeometry::kUnknown_SkPixelGeometry); |
| 134 |
} |
| 135 |
} |
| 136 |
|
| 137 |
DrawResult onDraw(SkCanvas* canvas, SkString* errorMsg) override { |
| 138 |
SkPaint paint; |
| 139 |
paint.setColor(SK_ColorBLACK); |
| 140 |
|
| 141 |
fTestDataIterator.rewind(); |
| 142 |
TestFontDataProvider::TestSet testSet; |
| 143 |
|
| 144 |
while (fTestDataIterator.next(&testSet)) { |
| 145 |
sk_sp<SkTypeface> testTypeface = SkTypeface_Make_Fontations( |
| 146 |
SkStream::MakeFromFile(testSet.fontFilename.c_str()), SkFontArguments()); |
| 147 |
sk_sp<SkTypeface> ftTypeface = SkTypeface_FreeType::MakeFromStream( |
| 148 |
SkStream::MakeFromFile(testSet.fontFilename.c_str()), SkFontArguments()); |
| 149 |
|
| 150 |
if (!testTypeface || !ftTypeface) { |
| 151 |
*errorMsg = "Unable to initialize typeface."; |
| 152 |
return DrawResult::kSkip; |
| 153 |
} |
| 154 |
|
| 155 |
auto configureFont = [this](SkFont& font) { |
| 156 |
font.setSize(kFontSize); |
| 157 |
font.setEdging(SkFont::Edging::kSubpixelAntiAlias); |
| 158 |
font.setSubpixel(true); |
| 159 |
font.setHinting(fHintingMode); |
| 160 |
}; |
| 161 |
|
| 162 |
SkFont font(testTypeface); |
| 163 |
configureFont(font); |
| 164 |
|
| 165 |
SkFont ftFont(ftTypeface); |
| 166 |
configureFont(ftFont); |
| 167 |
enum class DrawPhase { Fontations, FreeType, Comparison }; |
| 168 |
|
| 169 |
SkCanvas* drawCanvas = canvas; |
| 170 |
SkRect maxBounds = SkRect::MakeEmpty(); |
| 171 |
for (auto phase : {DrawPhase::Fontations, DrawPhase::FreeType, DrawPhase::Comparison}) { |
| 172 |
SkScalar yCoord = kFontSize * 1.5f; |
| 173 |
|
| 174 |
for (auto& langEntry : testSet.langSamples) { |
| 175 |
auto shapeAndDrawToCanvas = [drawCanvas, paint, langEntry](const SkFont& font, |
| 176 |
SkPoint coord) { |
| 177 |
std::string testString(langEntry.sampleShort.c_str(), |
| 178 |
langEntry.sampleShort.size()); |
| 179 |
SkTextBlobBuilderRunHandler textBlobBuilder(testString.c_str(), {0, 0}); |
| 180 |
std::unique_ptr<SkShaper> shaper = SkShaper::Make(); |
| 181 |
shaper->shape(testString.c_str(), |
| 182 |
testString.size(), |
| 183 |
font, |
| 184 |
true, |
| 185 |
999999, /* Don't linebreak. */ |
| 186 |
&textBlobBuilder); |
| 187 |
sk_sp<const SkTextBlob> blob = textBlobBuilder.makeBlob(); |
| 188 |
drawCanvas->drawTextBlob(blob.get(), coord.x(), coord.y(), paint); |
| 189 |
return blob->bounds(); |
| 190 |
}; |
| 191 |
|
| 192 |
auto roundToDevicePixels = [drawCanvas](SkPoint& point) { |
| 193 |
SkMatrix ctm = drawCanvas->getLocalToDeviceAs3x3(); |
| 194 |
SkPoint mapped = ctm.mapPoint(point); |
| 195 |
SkPoint mappedRounded = |
| 196 |
SkPoint::Make(roundf(mapped.x()), roundf(mapped.y())); |
| 197 |
SkMatrix inverse; |
| 198 |
bool inverseExists = ctm.invert(&inverse); |
| 199 |
SkASSERT(inverseExists); |
| 200 |
if (inverseExists) { |
| 201 |
point = inverse.mapPoint(mappedRounded); |
| 202 |
} |
| 203 |
}; |
| 204 |
|
| 205 |
auto fontationsCoord = [yCoord, roundToDevicePixels]() { |
| 206 |
SkPoint fontationsCoord = SkPoint::Make(kMargin, yCoord); |
| 207 |
roundToDevicePixels(fontationsCoord); |
| 208 |
return fontationsCoord; |
| 209 |
}; |
| 210 |
|
| 211 |
auto freetypeCoord = [yCoord, maxBounds, roundToDevicePixels]() { |
| 212 |
SkPoint freetypeCoord = SkPoint::Make( |
| 213 |
2 * kMargin + maxBounds.left() + maxBounds.width(), yCoord); |
| 214 |
roundToDevicePixels(freetypeCoord); |
| 215 |
return freetypeCoord; |
| 216 |
}; |
| 217 |
|
| 218 |
switch (phase) { |
| 219 |
case DrawPhase::Fontations: { |
| 220 |
SkRect boundsFontations = shapeAndDrawToCanvas(font, fontationsCoord()); |
| 221 |
/* Determine maximum of column width across all language samples. */ |
| 222 |
boundsFontations.roundOut(); |
| 223 |
maxBounds.join(boundsFontations); |
| 224 |
break; |
| 225 |
} |
| 226 |
case DrawPhase::FreeType: { |
| 227 |
shapeAndDrawToCanvas(ftFont, freetypeCoord()); |
| 228 |
break; |
| 229 |
} |
| 230 |
case DrawPhase::Comparison: { |
| 231 |
/* Read back pixels from equally sized rectangles from the space in |
| 232 |
* SkCanvas where Fontations and FreeType sample texts were drawn, |
| 233 |
* compare them using pixel comparisons similar to SkDiff, draw a |
| 234 |
* comparison as faint pixel differences, and as an amplified |
| 235 |
* visualization in which each differing pixel is drawn as white. */ |
| 236 |
SkPoint fontationsOrigin = fontationsCoord(); |
| 237 |
SkPoint freetypeOrigin = freetypeCoord(); |
| 238 |
SkRect fontationsBBox(maxBounds.makeOffset(fontationsOrigin)); |
| 239 |
SkRect freetypeBBox(maxBounds.makeOffset(freetypeOrigin)); |
| 240 |
|
| 241 |
SkMatrix ctm = drawCanvas->getLocalToDeviceAs3x3(); |
| 242 |
ctm.mapRect(&fontationsBBox, fontationsBBox); |
| 243 |
ctm.mapRect(&freetypeBBox, freetypeBBox); |
| 244 |
|
| 245 |
SkIRect fontationsIBox(fontationsBBox.roundOut()); |
| 246 |
SkIRect freetypeIBox(freetypeBBox.roundOut()); |
| 247 |
|
| 248 |
SkISize pixelDimensions(fontationsIBox.size()); |
| 249 |
SkImageInfo canvasImageInfo = drawCanvas->imageInfo(); |
| 250 |
SkImageInfo diffImageInfo = |
| 251 |
SkImageInfo::Make(pixelDimensions, |
| 252 |
SkColorType::kN32_SkColorType, |
| 253 |
SkAlphaType::kUnpremul_SkAlphaType); |
| 254 |
|
| 255 |
SkBitmap diffBitmap, highlightDiffBitmap; |
| 256 |
diffBitmap.allocPixels(diffImageInfo, 0); |
| 257 |
highlightDiffBitmap.allocPixels(diffImageInfo, 0); |
| 258 |
|
| 259 |
// Workaround OveridePaintFilterCanvas limitations |
| 260 |
// by getting pixel access through peekPixels() |
| 261 |
// instead of readPixels(). Then use same pixmap to |
| 262 |
// later write back the comparison results. |
| 263 |
SkPixmap canvasPixmap; |
| 264 |
if (!drawCanvas->peekPixels(&canvasPixmap)) { |
| 265 |
break; |
| 266 |
} |
| 267 |
|
| 268 |
SkPixmap fontationsPixmap, freetypePixmap; |
| 269 |
if (!canvasPixmap.extractSubset(&fontationsPixmap, fontationsIBox) || |
| 270 |
!canvasPixmap.extractSubset(&freetypePixmap, freetypeIBox)) { |
| 271 |
break; |
| 272 |
} |
| 273 |
|
| 274 |
comparePixels(fontationsPixmap, |
| 275 |
freetypePixmap, |
| 276 |
&diffBitmap, |
| 277 |
&highlightDiffBitmap); |
| 278 |
|
| 279 |
/* Place comparison results as two extra columns, shift up to account |
| 280 |
for placement of rectangles vs. SkTextBlobs (baseline shift). */ |
| 281 |
SkPoint comparisonCoord = ctm.mapPoint(SkPoint::Make( |
| 282 |
3 * kMargin + maxBounds.width() * 2, yCoord + maxBounds.top())); |
| 283 |
SkPoint whiteCoord = ctm.mapPoint(SkPoint::Make( |
| 284 |
4 * kMargin + maxBounds.width() * 3, yCoord + maxBounds.top())); |
| 285 |
|
| 286 |
SkSurfaceProps canvasSurfaceProps = drawCanvas->getBaseProps(); |
| 287 |
sk_sp<SkSurface> writeBackSurface = |
| 288 |
SkSurfaces::WrapPixels(canvasPixmap, &canvasSurfaceProps); |
| 289 |
|
| 290 |
writeBackSurface->writePixels( |
| 291 |
diffBitmap, comparisonCoord.x(), comparisonCoord.y()); |
| 292 |
writeBackSurface->writePixels( |
| 293 |
highlightDiffBitmap, whiteCoord.x(), whiteCoord.y()); |
| 294 |
break; |
| 295 |
} |
| 296 |
} |
| 297 |
|
| 298 |
yCoord += font.getSize() * kLangYIncrementScale; |
| 299 |
} |
| 300 |
} |
| 301 |
} |
| 302 |
|
| 303 |
return DrawResult::kOk; |
| 304 |
} |
| 305 |
|
| 306 |
private: |
| 307 |
using INHERITED = GM; |
| 308 |
|
| 309 |
TestFontDataProvider fTestDataIterator; |
| 310 |
SkString fTestName; |
| 311 |
SimulatePixelGeometry fSimulatePixelGeometry; |
| 312 |
SkFontHinting fHintingMode; |
| 313 |
sk_sp<SkTypeface> fReportTypeface; |
| 314 |
std::unique_ptr<SkFontArguments::VariationPosition::Coordinate[]> fCoordinates; |
| 315 |
}; |
| 316 |
|
| 317 |
DEF_GM(return new FontationsFtCompareGM( |
| 318 |
"NotoSans", |
| 319 |
"Noto Sans", |
| 320 |
"en_Latn|es_Latn|pt_Latn|id_Latn|ru_Cyrl|fr_Latn|tr_Latn|vi_Latn|de_" |
| 321 |
"Latn|it_Latn|pl_Latn|nl_Latn|uk_Cyrl|gl_Latn|ro_Latn|cs_Latn|hu_Latn|" |
| 322 |
"el_Grek|se_Latn|da_Latn|bg_Latn|sk_Latn|fi_Latn|bs_Latn|ca_Latn|no_" |
| 323 |
"Latn|sr_Latn|sr_Cyrl|lt_Latn|hr_Latn|sl_Latn|uz_Latn|uz_Cyrl|lv_Latn|" |
| 324 |
"et_Latn|az_Latn|az_Cyrl|la_Latn|tg_Latn|tg_Cyrl|sw_Latn|mn_Cyrl|kk_" |
| 325 |
"Latn|kk_Cyrl|sq_Latn|af_Latn|ha_Latn|ky_Cyrl", |
| 326 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 327 |
|
| 328 |
DEF_GM(return new FontationsFtCompareGM( |
| 329 |
"NotoSans", |
| 330 |
"Noto Sans", |
| 331 |
"en_Latn|es_Latn|pt_Latn|id_Latn|ru_Cyrl|fr_Latn|tr_Latn|vi_Latn|de_" |
| 332 |
"Latn|it_Latn|pl_Latn|nl_Latn|uk_Cyrl|gl_Latn|ro_Latn|cs_Latn|hu_Latn|" |
| 333 |
"el_Grek|se_Latn|da_Latn|bg_Latn|sk_Latn|fi_Latn|bs_Latn|ca_Latn|no_" |
| 334 |
"Latn|sr_Latn|sr_Cyrl|lt_Latn|hr_Latn|sl_Latn|uz_Latn|uz_Cyrl|lv_Latn|" |
| 335 |
"et_Latn|az_Latn|az_Cyrl|la_Latn|tg_Latn|tg_Cyrl|sw_Latn|mn_Cyrl|kk_" |
| 336 |
"Latn|kk_Cyrl|sq_Latn|af_Latn|ha_Latn|ky_Cyrl", |
| 337 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs, |
| 338 |
SkFontHinting::kSlight)) |
| 339 |
|
| 340 |
DEF_GM(return new FontationsFtCompareGM( |
| 341 |
"NotoSans", |
| 342 |
"Noto Sans", |
| 343 |
"en_Latn|es_Latn|pt_Latn|id_Latn|ru_Cyrl|fr_Latn|tr_Latn|vi_Latn|de_" |
| 344 |
"Latn|it_Latn|pl_Latn|nl_Latn|uk_Cyrl|gl_Latn|ro_Latn|cs_Latn|hu_Latn|" |
| 345 |
"el_Grek|se_Latn|da_Latn|bg_Latn|sk_Latn|fi_Latn|bs_Latn|ca_Latn|no_" |
| 346 |
"Latn|sr_Latn|sr_Cyrl|lt_Latn|hr_Latn|sl_Latn|uz_Latn|uz_Cyrl|lv_Latn|" |
| 347 |
"et_Latn|az_Latn|az_Cyrl|la_Latn|tg_Latn|tg_Cyrl|sw_Latn|mn_Cyrl|kk_" |
| 348 |
"Latn|kk_Cyrl|sq_Latn|af_Latn|ha_Latn|ky_Cyrl", |
| 349 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs, |
| 350 |
SkFontHinting::kNormal)) |
| 351 |
|
| 352 |
DEF_GM(return new FontationsFtCompareGM( |
| 353 |
"NotoSans", |
| 354 |
"Noto Sans", |
| 355 |
"en_Latn|es_Latn|pt_Latn|id_Latn|ru_Cyrl|fr_Latn|tr_Latn|vi_Latn|de_" |
| 356 |
"Latn|it_Latn|pl_Latn|nl_Latn|uk_Cyrl|gl_Latn|ro_Latn|cs_Latn|hu_Latn|" |
| 357 |
"el_Grek|se_Latn|da_Latn|bg_Latn|sk_Latn|fi_Latn|bs_Latn|ca_Latn|no_" |
| 358 |
"Latn|sr_Latn|sr_Cyrl|lt_Latn|hr_Latn|sl_Latn|uz_Latn|uz_Cyrl|lv_Latn|" |
| 359 |
"et_Latn|az_Latn|az_Cyrl|la_Latn|tg_Latn|tg_Cyrl|sw_Latn|mn_Cyrl|kk_" |
| 360 |
"Latn|kk_Cyrl|sq_Latn|af_Latn|ha_Latn|ky_Cyrl", |
| 361 |
FontationsFtCompareGM::SimulatePixelGeometry::kSimulateUnknown)) |
| 362 |
|
| 363 |
DEF_GM(return new FontationsFtCompareGM( |
| 364 |
"NotoSans", |
| 365 |
"Noto Sans", |
| 366 |
"en_Latn|es_Latn|pt_Latn|id_Latn|ru_Cyrl|fr_Latn|tr_Latn|vi_Latn|de_" |
| 367 |
"Latn|it_Latn|pl_Latn|nl_Latn|uk_Cyrl|gl_Latn|ro_Latn|cs_Latn|hu_Latn|" |
| 368 |
"el_Grek|se_Latn|da_Latn|bg_Latn|sk_Latn|fi_Latn|bs_Latn|ca_Latn|no_" |
| 369 |
"Latn|sr_Latn|sr_Cyrl|lt_Latn|hr_Latn|sl_Latn|uz_Latn|uz_Cyrl|lv_Latn|" |
| 370 |
"et_Latn|az_Latn|az_Cyrl|la_Latn|tg_Latn|tg_Cyrl|sw_Latn|mn_Cyrl|kk_" |
| 371 |
"Latn|kk_Cyrl|sq_Latn|af_Latn|ha_Latn|ky_Cyrl", |
| 372 |
FontationsFtCompareGM::SimulatePixelGeometry::kSimulateUnknown, |
| 373 |
SkFontHinting::kSlight)) |
| 374 |
|
| 375 |
DEF_GM(return new FontationsFtCompareGM( |
| 376 |
"NotoSans", |
| 377 |
"Noto Sans", |
| 378 |
"en_Latn|es_Latn|pt_Latn|id_Latn|ru_Cyrl|fr_Latn|tr_Latn|vi_Latn|de_" |
| 379 |
"Latn|it_Latn|pl_Latn|nl_Latn|uk_Cyrl|gl_Latn|ro_Latn|cs_Latn|hu_Latn|" |
| 380 |
"el_Grek|se_Latn|da_Latn|bg_Latn|sk_Latn|fi_Latn|bs_Latn|ca_Latn|no_" |
| 381 |
"Latn|sr_Latn|sr_Cyrl|lt_Latn|hr_Latn|sl_Latn|uz_Latn|uz_Cyrl|lv_Latn|" |
| 382 |
"et_Latn|az_Latn|az_Cyrl|la_Latn|tg_Latn|tg_Cyrl|sw_Latn|mn_Cyrl|kk_" |
| 383 |
"Latn|kk_Cyrl|sq_Latn|af_Latn|ha_Latn|ky_Cyrl", |
| 384 |
FontationsFtCompareGM::SimulatePixelGeometry::kSimulateUnknown, |
| 385 |
SkFontHinting::kNormal)) |
| 386 |
|
| 387 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Deva", |
| 388 |
"Noto Sans Devanagari", |
| 389 |
"hi_Deva|mr_Deva", |
| 390 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 391 |
|
| 392 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Deva", |
| 393 |
"Noto Sans Devanagari", |
| 394 |
"hi_Deva|mr_Deva", |
| 395 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs, |
| 396 |
SkFontHinting::kSlight)) |
| 397 |
|
| 398 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Deva", |
| 399 |
"Noto Sans Devanagari", |
| 400 |
"hi_Deva|mr_Deva", |
| 401 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs, |
| 402 |
SkFontHinting::kNormal)) |
| 403 |
|
| 404 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_ar_Arab", |
| 405 |
"Noto Sans Arabic", |
| 406 |
"ar_Arab|uz_Arab|kk_Arab|ky_Arab", |
| 407 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 408 |
|
| 409 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_ar_Arab", |
| 410 |
"Noto Sans Arabic", |
| 411 |
"ar_Arab|uz_Arab|kk_Arab|ky_Arab", |
| 412 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs, |
| 413 |
SkFontHinting::kSlight)) |
| 414 |
|
| 415 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_ar_Arab", |
| 416 |
"Noto Sans Arabic", |
| 417 |
"ar_Arab|uz_Arab|kk_Arab|ky_Arab", |
| 418 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs, |
| 419 |
SkFontHinting::kNormal)) |
| 420 |
|
| 421 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Beng", |
| 422 |
"Noto Sans Bengali", |
| 423 |
"bn_Beng", |
| 424 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 425 |
|
| 426 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Jpan", |
| 427 |
"Noto Sans JP", |
| 428 |
"ja_Jpan", |
| 429 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 430 |
|
| 431 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Thai", |
| 432 |
"Noto Sans Thai", |
| 433 |
"th_Thai", |
| 434 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 435 |
|
| 436 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Hans", |
| 437 |
"Noto Sans SC", |
| 438 |
"zh_Hans", |
| 439 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 440 |
|
| 441 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Hant", |
| 442 |
"Noto Sans TC", |
| 443 |
"zh_Hant", |
| 444 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 445 |
|
| 446 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Kore", |
| 447 |
"Noto Sans KR", |
| 448 |
"ko_Kore", |
| 449 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 450 |
|
| 451 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Taml", |
| 452 |
"Noto Sans Tamil", |
| 453 |
"ta_Taml", |
| 454 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 455 |
|
| 456 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Newa", |
| 457 |
"Noto Sans Newa", |
| 458 |
"new_Newa", |
| 459 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 460 |
|
| 461 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Knda", |
| 462 |
"Noto Sans Kannada", |
| 463 |
"kn_Knda", |
| 464 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 465 |
|
| 466 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Tglg", |
| 467 |
"Noto Sans Tagalog", |
| 468 |
"fil_Tglg", |
| 469 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 470 |
|
| 471 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Telu", |
| 472 |
"Noto Sans Telugu", |
| 473 |
"te_Telu", |
| 474 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 475 |
|
| 476 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Gujr", |
| 477 |
"Noto Sans Gujarati", |
| 478 |
"gu_Gujr", |
| 479 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 480 |
|
| 481 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Geor", |
| 482 |
"Noto Sans Georgian", |
| 483 |
"ka_Geor", |
| 484 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 485 |
|
| 486 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Mlym", |
| 487 |
"Noto Sans Malayalam", |
| 488 |
"ml_Mlym", |
| 489 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 490 |
|
| 491 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Khmr", |
| 492 |
"Noto Sans Khmer", |
| 493 |
"km_Khmr", |
| 494 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 495 |
|
| 496 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Sinh", |
| 497 |
"Noto Sans Sinhala", |
| 498 |
"si_Sinh", |
| 499 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 500 |
|
| 501 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Mymr", |
| 502 |
"Noto Sans Myanmar", |
| 503 |
"my_Mymr", |
| 504 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 505 |
|
| 506 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Java", |
| 507 |
"Noto Sans Javanese", |
| 508 |
"jv_Java", |
| 509 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 510 |
|
| 511 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Mong", |
| 512 |
"Noto Sans Mongolian", |
| 513 |
"mn_Mong", |
| 514 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 515 |
|
| 516 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Armn", |
| 517 |
"Noto Sans Armenian", |
| 518 |
"hy_Armn", |
| 519 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 520 |
|
| 521 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Elba", |
| 522 |
"Noto Sans Elbasan", |
| 523 |
"sq_Elba", |
| 524 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 525 |
|
| 526 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Vith", |
| 527 |
"Noto Sans Vithkuqi", |
| 528 |
"sq_Vith", |
| 529 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 530 |
|
| 531 |
DEF_GM(return new FontationsFtCompareGM("NotoSans_Guru", |
| 532 |
"Noto Sans Gurmukhi", |
| 533 |
"pa_Guru", |
| 534 |
FontationsFtCompareGM::SimulatePixelGeometry::kLeaveAsIs)) |
| 535 |
|
| 536 |
} // namespace skiagm |