Unverified Commit 87982c0c authored by Ivan Matkov's avatar Ivan Matkov Committed by GitHub

Update skia to to m148 (#1195)

[SKIKO-1099](https://youtrack.jetbrains.com/issue/SKIKO-1099) Update
skia to m148
parent e63d3d7b
...@@ -77,10 +77,9 @@ fun SkikoProjectContext.declareWasmTasks() { ...@@ -77,10 +77,9 @@ fun SkikoProjectContext.declareWasmTasks() {
buildVariant.set(buildType) buildVariant.set(buildType)
libFiles = project.fileTree(skiaWasmDir.get()) { libFiles = project.fileTree(skiaWasmDir.get()) {
// TODO: The '.a.wasm' file extension may change in future releases include("**/*.wasm.a")
include("**/*.a.wasm") exclude("**/libskia_graphite_ext.wasm.a")
exclude("**/libskia_graphite_ext.a.wasm") exclude("**/libskia_graphite_dawn_ext.wasm.a")
exclude("**/libskia_graphite_dawn_ext.a.wasm")
} }
objectFiles = project.fileTree(compileWasm.map { it.outDir.get() }) { objectFiles = project.fileTree(compileWasm.map { it.outDir.get() }) {
include("**/*.o") include("**/*.o")
......
...@@ -7,7 +7,7 @@ kotlin.mpp.enableCInteropCommonization=true ...@@ -7,7 +7,7 @@ kotlin.mpp.enableCInteropCommonization=true
deploy.version=0.0.0 deploy.version=0.0.0
# a tag from https://github.com/JetBrains/skia/releases # a tag from https://github.com/JetBrains/skia/releases
dependencies.skia=m147-64a2414108 dependencies.skia=m148-8967a2e80c
# a tag from https://github.com/JetBrains/angle-pack # a tag from https://github.com/JetBrains/angle-pack
dependencies.angle=ec4d8f8e4d dependencies.angle=ec4d8f8e4d
......
...@@ -14,6 +14,7 @@ import kotlin.test.Test ...@@ -14,6 +14,7 @@ import kotlin.test.Test
import kotlin.test.assertContentEquals import kotlin.test.assertContentEquals
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertNotEquals import kotlin.test.assertNotEquals
import kotlin.test.assertTrue
class TextLineTest { class TextLineTest {
private val inter36: suspend () -> Font = suspend { private val inter36: suspend () -> Font = suspend {
...@@ -144,12 +145,25 @@ class TextLineTest { ...@@ -144,12 +145,25 @@ class TextLineTest {
assertEquals("☺", ManagedString("☺").toString()) assertEquals("☺", ManagedString("☺").toString())
assertEquals("☺️", ManagedString("☺️").toString()) assertEquals("☺️", ManagedString("☺️").toString())
TextLine.make("☺", firaCode36()).use { misc -> val font = firaCode36()
TextLine.make("☺️", firaCode36()).use { emoji -> val smileGlyph = font.getUTF32Glyph(0x263A) // U+263A WHITE SMILING FACE
assertContentEquals(shortArrayOf(1706), misc.glyphs)
assertEquals(1, emoji.glyphs.size) TextLine.make("☺", font).use { misc ->
if (kotlinBackend.isNotJs()) { // TODO(karpovich): try with a FontMngr without fallbacks TextLine.make("☺️", font).use { emoji ->
assertContentEquals(shortArrayOf(smileGlyph), misc.glyphs)
if (kotlinBackend.isNotJs()) {
// Skia m148 changed HarfBuzz variation-selector handling, and
// `TextLine.make("☺️", FiraCode)` now shapes as two glyphs.
// Exact variation-selector glyph IDs differ across native backends, but
// these invariants are stable:
// 1) the sequence produces two glyphs;
// 2) first glyph differs from bare U+263A;
// 3) second glyph is non-zero.
assertEquals(2, emoji.glyphs.size)
assertNotEquals(misc.glyphs[0], emoji.glyphs[0]) assertNotEquals(misc.glyphs[0], emoji.glyphs[0])
assertNotEquals(0, emoji.glyphs[1].toInt())
} else { // TODO(karpovich): try with a FontMngr without fallbacks
assertTrue(emoji.glyphs.isNotEmpty())
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment