mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 23:48:05 +03:00
Merge pull request #13912 from atom/wl-remove-workaround
Remove macOS emoji workaround
This commit is contained in:
commit
5f2dc226b5
@ -54,12 +54,10 @@ describe "WorkspaceElement", ->
|
||||
it "updates the font-family based on the 'editor.fontFamily' config value", ->
|
||||
initialCharWidth = editor.getDefaultCharWidth()
|
||||
fontFamily = atom.config.get('editor.fontFamily')
|
||||
fontFamily += ', "Apple Color Emoji"' if process.platform is 'darwin'
|
||||
expect(getComputedStyle(editorElement).fontFamily).toBe fontFamily
|
||||
|
||||
atom.config.set('editor.fontFamily', 'sans-serif')
|
||||
fontFamily = atom.config.get('editor.fontFamily')
|
||||
fontFamily += ', "Apple Color Emoji"' if process.platform is 'darwin'
|
||||
expect(getComputedStyle(editorElement).fontFamily).toBe fontFamily
|
||||
expect(editor.getDefaultCharWidth()).not.toBe initialCharWidth
|
||||
|
||||
|
@ -44,15 +44,10 @@ class WorkspaceElement extends HTMLElement
|
||||
@subscriptions.add @config.onDidChange 'editor.lineHeight', @updateGlobalTextEditorStyleSheet.bind(this)
|
||||
|
||||
updateGlobalTextEditorStyleSheet: ->
|
||||
fontFamily = @config.get('editor.fontFamily')
|
||||
# TODO: There is a bug in how some emojis (e.g. ❤️) are rendered on macOS.
|
||||
# This workaround should be removed once we update to Chromium 51, where the
|
||||
# problem was fixed.
|
||||
fontFamily += ', "Apple Color Emoji"' if process.platform is 'darwin'
|
||||
styleSheetSource = """
|
||||
atom-text-editor {
|
||||
font-size: #{@config.get('editor.fontSize')}px;
|
||||
font-family: #{fontFamily};
|
||||
font-family: #{@config.get('editor.fontFamily')};
|
||||
line-height: #{@config.get('editor.lineHeight')};
|
||||
}
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user