leanprover / leanprover.github.io

www
https://lean-lang.org/
15 stars 24 forks source link

cursor position is off when some unicode characters are used #10

Closed leodemoura closed 9 years ago

leodemoura commented 9 years ago

I noticed the problem with two characters \and and \forall. For example, try to input

theorem tst : ∀a b: Prop, a ∧ b → a ∧ b:= 

The cursor position is so off that it is not even funny.

leodemoura commented 9 years ago

http://stackoverflow.com/questions/20931029/ace-editor-monospace-fonts-issues-with-cursor-spacing

leodemoura commented 9 years ago

https://github.com/ajaxorg/ace/issues/1666

soonhokong commented 9 years ago

@leodemoura, I think I fixed the problem. Could you test http://leanprover.com ? I've tested it on (Windows, OSX, Ubuntu) x (IE, Chrome, Firefox, Safari) combinations and I couldn't find a problem.

leodemoura commented 9 years ago

I tried the following

open num eq.ops
check ∀x y, x ∧ y → y ∨ x
check λ (x y : num) (H₁ : x = y) (H₂ : y = x), (H₁ ⬝ H₂)⁻¹⁻¹
soonhokong commented 9 years ago

I see. I will add more fonts on the list. Thanks for testing it.

soonhokong commented 9 years ago

I think the transitivity operator (⬝) is a monster. I have a problem with OSX.

Ubuntu 14 + Chrome

  • cursor position is incorrect (BTW, I believe it was working before)

Nope. It has the same problem with old configuration.

soonhokong commented 9 years ago

The problem is solved by using GNU Free Mono font. I used http://www.fontsquirrel.com/tools/webfont-generator to generate the web fonts of GNU Free Mono. This ensures the same user experience across platforms.