提交 314b460d 编写于 作者: B Behdad Esfahbod

Add HB_DIRECTION_IS_FORWARD/BACKWARD

上级 bdd0ff52
......@@ -81,6 +81,8 @@ typedef enum _hb_direction_t {
#define HB_DIRECTION_IS_HORIZONTAL(dir) ((dir) == HB_DIRECTION_LTR || (dir) == HB_DIRECTION_RTL)
#define HB_DIRECTION_IS_VERTICAL(dir) ((dir) == HB_DIRECTION_TTB || (dir) == HB_DIRECTION_BTT)
#define HB_DIRECTION_IS_FORWARD(dir) ((dir) == HB_DIRECTION_LTR || (dir) == HB_DIRECTION_TTB)
#define HB_DIRECTION_IS_BACKWARD(dir) ((dir) == HB_DIRECTION_RTL || (dir) == HB_DIRECTION_BTT)
#endif /* HB_COMMON_H */
......@@ -130,8 +130,7 @@ hb_shape (hb_font_t *font,
/* GPOS / kern */
/* TODO: Vertical */
if (buffer->direction == HB_DIRECTION_RTL)
if (HB_DIRECTION_IS_BACKWARD (buffer->direction))
hb_buffer_reverse (buffer);
buffer->direction = original_direction;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册