-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect cursor position when writing in non-latin text (e.g. in Russian) #665
Comments
Are you on Windows? It's working fine for me on OS X. One improvement that we can do on this is to add Source Code Pro has a wide range. I'm pretty sure Russian characters are in it. See Google Fonts entry and Source Code Pro repo |
I'm on Ubuntu 14.04. Cyrillic support in Source Code Pro was introduced recently, in July 2015. Looking at https://github.com/swagger-api/swagger-editor/tree/master/app/fonts I can conclude that Swagger distributes own copy of Source Code Pro fonts, and last version of the fonts was updated 4 months ago, when no Cyrillic support was in the Source Code Pro font. |
@mohsen1 I think you are lucky that fallback font for Source Code Pro on your system has monospace Cyrillic glyphs. |
I think that is the case. Can you run Swagger Editor locally and update the font file with latest from their GitHub repo and let me know the results? It would be nice if you make a pull request with that change. |
I would love to take out fonts from source code but not all of them are available in bower/github. If you can do it even partially I would appreciate it. |
Source Code Pro is not published in Bower, instead they suggest to install directly from GitHub. Source Code Pro's release branch doesn't have SVG version of fonts (which are not supported in major browsers anyway), but has WOFF2 version. |
Then lets keep having font files in the source code. It's more reliable and predictable. |
I used specific git sha1 version in PR - this should be reliable and predictable, unless Adobe will decide to remove whole repository. |
ok, works for me. Does it install all variants(thicknesses)? |
I believe so. |
AFAIK Ace editor supports only monospace fonts and used in Swagger Editor Source Code Pro font doesn't have Cyrillic glyphs, so browser uses some other, non monospace, font.
Here is example of how it looks like if I type "ЩЩЩ":
Notice cursor floating in the center of the letter.
Here is how it looks if I disable Source Code Pro font in Firefox style editor:
The text was updated successfully, but these errors were encountered: