mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-21 19:47:21 +03:00
Runa simplified version of the font rendering test on macOS
This commit is contained in:
parent
6c98b676bb
commit
dc7d705c87
@ -3,7 +3,6 @@
|
||||
# License: GPL v3 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net>
|
||||
|
||||
from collections import OrderedDict
|
||||
import unittest
|
||||
|
||||
from kitty.fast_data_types import (
|
||||
set_send_sprite_to_gpu, sprite_map_set_layout,
|
||||
@ -54,11 +53,13 @@ def test_box_drawing(self):
|
||||
test_render_line(line)
|
||||
self.assertEqual(len(self.sprites), prerendered + len(box_chars))
|
||||
|
||||
@unittest.skipIf(isosx, 'macOS is too underpowered')
|
||||
def test_rendering(self):
|
||||
text = 'He\u0347\u0305llo\u0341, w\u0302or\u0306l\u0354d!'
|
||||
# macOS has no fonts capable of rendering combining chars
|
||||
if isosx:
|
||||
text = text.encode('ascii', 'ignore').decode('ascii')
|
||||
cells = render_string(text)[-1]
|
||||
self.ae(len(cells), len(text.encode('ascii', 'ignore')))
|
||||
text = '你好,世界'
|
||||
cells = render_string(text)[-1]
|
||||
self.ae(len(cells), 9)
|
||||
self.ae(len(cells), 9 - (4 if isosx else 0))
|
||||
|
Loading…
Reference in New Issue
Block a user