editor.setFontSize() has no effect

1,486 views
Skip to first unread message

Mark Volkmann

unread,
Jan 31, 2013, 9:31:19 AM1/31/13
to ace-d...@googlegroups.com
When I call editor.setFontSize(pixels), nothing changes. Is there something else I need to do to make the change take effect?

--
R. Mark Volkmann
Object Computing, Inc.

Harutyun Amirjanyan

unread,
Jan 31, 2013, 9:53:51 AM1/31/13
to ace-d...@googlegroups.com
currently it only does editor.container.style.fontSize= val
so requires using valid css fontSize string
editor.setFontSize("12px")
editor.setFontSize("0.4em")
i'll change it to accept integers too

Mark Volkmann

unread,
Feb 1, 2013, 10:50:56 AM2/1/13
to ace-d...@googlegroups.com
There was another issue I ran into that I wanted to share.
I am also using Twitter Bootstrap.
After getting editor.setFontSize() to work properly using your advice, the lines were overlapping vertically.
That was due to a Twitter Bootstrap CSS file setting the line-height property to 18px.
I changed my CSS file to override that like this:

#.ace_editor {
  line-height: normal;

That fixed it!

Harutyun Amirjanyan

unread,
Feb 13, 2013, 4:42:58 PM2/13/13
to ace-d...@googlegroups.com
I've added `line-height: normal;` to ace css, since almost all sites
using ace+Bootstrap were affected by this problem
thanks for noticing this!

btw. integer font size and -s flag in build are fixed now too

Gulnur Ualiyeva

unread,
Mar 13, 2016, 2:10:40 PM3/13/16
to Ajax.org Cloud9 Editor (Ace)
Hi, I wonder if you had changed it to accept integers? 
Reply all
Reply to author
Forward
0 new messages