cocoa - How to insert emoji into NSTextView without shifting the line down? -
how insert emoji nstextview
without moving line down?
if insert emoji character nstextview
, whole line shift down couple pixels. if remove emoji character, move original position.
on other hand, if insert emoji nstextfield
, line doesn't move @ all, when text in line same font , size in nstextview
.
you can see behavior in textedit. when typing in main editor area (an nstextview
), emoji make lines move down. when typing in find search bar (nstextfield
) emoji don't affect line position.
i've tried setting typingattributes
various nsparagraphstyle
settings (lineheight
, linespacing
, lineheightmultiple
, max/minlineheight
) , raising or lowering baseline no avail. in fact, of these settings don't emoji behavior, mess vertical alignment of spelling error indicators.
Comments
Post a Comment