Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions harfbuzz/harfbuzz_shape_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,17 @@ func (mft testInput) shape(t *testing.T, verify bool) (string, error) {
return "", err
}

// check that YAdvance is only used for vertical text
// and XAdvance for horizontal text
isHorizontal := buffer.Props.Direction.isHorizontal()
for _, pos := range buffer.Pos {
if isHorizontal {
tu.Assert(t, pos.YAdvance == 0)
} else {
tu.Assert(t, pos.XAdvance == 0)
}
}

return buffer.serialize(font, mft.format), nil
}

Expand Down