Skip to content

Wide Character problem / Space Between Character problem  #790

Closed

Description

@ApolloTang

macvim version:

$ brew info macvim
macvim: stable 8.1-151 (bottled), HEAD
GUI for vim, made for macOS
https://github.com/macvim-dev/macvim
/usr/local/Cellar/macvim/8.1-151 (2,173 files, 34.9MB) *
  Poured from bottle on 2018-11-01 at 21:00:51
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/macvim.rb

I am running macvim on:

macOS Mojave version 10.14.1

Issue:

I updated macvim to 8.1-151 after Mojave, space in between wide character is not display properly.
For example, when I am trying to display this ascii diagram:

┌───────────────┐              ┌──────────────┐
│               │              │              │
│               │              │              │
│               │              │              │
│               ├─────────────▶│              │
│               │              │              │
│               │              │              │
│               │              │              │
│               │              │              │
└───────────────┘              │              │
                               └──────────────┘

where '┌' ,'└', ','┘', '┐', ' ─', and '▶' are wide character; while '│', and ' ' (space) are normal character.

The rendering in MacVim shows:

screen shot 2018-11-26 at 1 16 42 am

my font setting are:

guifont=Inconsolata:h14
guifontwide=
encoding=utf-8
ambiwidth=single

Inconsolata is fix width font the width of charecter should be identical, but the rendering clearly shown otherwise.

Expected correct behaviour

I am expected this to be displayed like:
screen shot 2018-11-26 at 1 18 53 am

The above is running vim in terminal that using the same font but different size: Inconsolata Regular 17pt.

I have tried:

set guifontwide=Menlo Regular:h14

Because help: guifontwide seem to indicates that macvim will use font specified in guifontwide when displaying wide character. But setting this does not help either.

I don't think this has to do with guifontwide, it is more likely due to the how macvim render the space between character and I believe that the rendering behaviour has changed since Mojave update..

Here is another example of where wide character display that result in misalignment:

screen shot 2018-11-26 at 11 42 18 am

I am not using 'Core Text renderer', here is my preference for macvim:

screen shot 2018-11-26 at 11 48 03 am

screen shot 2018-11-26 at 11 47 49 am

Activity

  1. ApolloTang commented on Nov 26, 2018

    @ApolloTang
    Author

    possibly relate to #455, #726 ?

  2. changed the title [-]Wide Character problem [/-] [+]Wide Character problem / Space Between Character problem [/+] on Nov 26, 2018
  3. ychin commented on Nov 26, 2018

    @ychin
    Member

    What's the actual text you tried to display? Do you mind pasting it in a comment within a code block? It's a little hard to tell where the actual wide character is.

    Also, are you using Core Text renderer?

  4. ApolloTang commented on Nov 26, 2018

    @ApolloTang
    Author

    @ychin, I have update my description for the information you requested.

  5. ychin commented on Nov 27, 2018

    @ychin
    Member

    Thanks @ApolloTang. Did you turn off "Core Text renderer" to deal with the rendering issues in Mojave (#751)? Right now, the non-Core Text renderer doesn't deal with the CJK full-width characters in the exact same way as the Core Text renderer (which behaves more like how normal Vim) would.

    In this case, I would recommend one of the following:

    1. Use the default font in MacVim instead of Inconsolata. That should work out of the box and the text in your code block is rendered properly.
    2. Wait for Core Text rendering issues with macOS 10.14 Mojave #751 to get fixed and then enable Core Text renderer.
    3. Just enable Core Text renderer now and use a build of MacVim built using High Sierra SDKs. You can build it yourself or use our release (https://github.com/macvim-dev/macvim/releases).

    For (2). I was hoping to get it fixed by last week but it slipped so we should really be pushing out the rendering fixes by the end of this week.

  6. ApolloTang commented on Nov 28, 2018

    @ApolloTang
    Author

    @ychin thanks for your response.

    I will wait and watch for #751, since it is so close to release.

    For now I'll keep this open for reference in case other search for the same issue, but will close it on the release of #751.

  7. ApolloTang commented on Nov 28, 2018

    @ApolloTang
    Author

    Thank you so much for everyone who is working on #751 !

  8. ychin commented on Nov 28, 2018

    @ychin
    Member

    Please ping me if this doesn't get fixed by end of week.

  9. ychin commented on Dec 4, 2018

    @ychin
    Member

    #757 fixed Core Text renderer in Mojave. Please turn that on and try again. The non-Core Text renderer is mostly used as a backup and therefore not all text layout features and functionalities are as supported. If it fixed the issue please close the issue.

  10. ApolloTang commented on Dec 5, 2018

    @ApolloTang
    Author

    @ychin I brew upgrade macvim.
    now using /usr/local/Cellar/macvim/8.1-151_2/bin/mvim
    turn off core text rendering.
    But it is still flashing :(

    macvim8 1-151_2

    Am I missing something ? perhaps some dependency I have to update ?

  11. ApolloTang commented on Dec 5, 2018

    @ApolloTang
    Author

    This is indeed fixed, but has not added to brew yet. So

    $ brew upgrade macvim
    

    will not install the correct the latest fix version, you will need to install the HEAD

    $ brew install macvim --HEAD
    

    However, this is a problem, because ruby/config.h is missing after Mojave update:

    screen shot 2018-12-04 at 11 57 06 pm
    screen shot 2018-12-04 at 11 56 41 pm

    So for those of you like me, if you have the same problem you will have to download the correction version of Command Line Tool from https://developer.apple.com/download/more/ (for me this is Command_Line_Tools_macOS_10.14_for_Xcode_10.1) and install it.

    But that does not give you ruby/config.h, you have to cd into

    cd /Library/Developer/CommandLineTools/Packages/
    

    and execute macOS_SDK_headers_for_macOS_10.14.pkg:

    $ open macOS_SDK_headers_for_macOS_10.14.pkg
    

    Now you can run $ brew install macvim --HEAD

    Reference
    https://stackoverflow.com/a/53194299/3136861
    https://stackoverflow.com/a/53388305/3136861
    ruby/json#255
    #751 (comment)

  12. ApolloTang commented on Dec 5, 2018

    @ApolloTang
    Author

    Please let me know when the HEAD commit is added to brew, and I will close this issue.

  13. ychin commented on Dec 5, 2018

    @ychin
    Member

    Yeah you are right it's not deployed yet. I'll let you know when the official formula is updated.

  14. added
    RendererText rendering issues, including CoreText renderer
    on Dec 12, 2018
  15. ychin commented on Dec 20, 2018

    @ychin
    Member

    Homebrew should have been updated to snapshot 153. Feel free to verify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    RendererText rendering issues, including CoreText renderer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions