ryanpcmcquen / workflowyCodeFormatter

:hourglass_flowing_sand: A simple and lightweight solution to the WorkFlowy code dilemma. | https://addons.mozilla.org/en-US/firefox/addon/workflowy-code-formatter/ | https://chrome.google.com/webstore/detail/workflowy-code-formatter/kglihipcanlbglgikjghocmbbbbkfemn
Mozilla Public License 2.0
39 stars 6 forks source link

bug with russian words #6

Closed jt3k closed 8 years ago

jt3k commented 8 years ago

look here russian font is no monospaced

for testing u can get this code-snipet

for(let i=0; i<5; i++) {
   //здесь i доступна
}
//здесь i не доступна

or this link https://workflowy.com/s/vZc2xfdy3h

my system: osx el-capitan chrome 49.0.2623.87 (64-bit)

I can provide any help for testing

ryanpcmcquen commented 8 years ago

Hi @jt3k, thanks for using the extension! It looks like the formatting is fine. What behavior are you expecting?

I put your comments in workflowy and it highlighted in the same way as English comments:

screenshot-2016-03-18-at-11 09 09-compressor

jt3k commented 8 years ago

hm.. then the problem is in default mono-spaced font in the browser

in my default browser settings i look this

=> the "Courier" font for monospaced text


I did some research, and I can say that the two fonts fit well

this font:, "Courier New"

this my research: I created a test page with multiple blocks with mono-spaced font http://jsbin.com/xutikoqeti

in different browsers it looks like this

IE9

Firefox 44.0.2

Chrome 49.0.2623...


On these screenshots we can see that the most suitable mono-spaced font is courier-new

Let's make it to be default font in workflowyCodeFormatter ?

ryanpcmcquen commented 8 years ago

workflowyCodeFormatter does not set the font (and I don't think it should), that part actually comes from Google's code-prettify. You are welcome to open the issue there.

jt3k commented 8 years ago

lol ok

ryanpcmcquen commented 8 years ago

Oops, I mis-spoke. This is actually set by the Browser/OS. We aren't likely to find a solution that works well across all platforms. Sorry if this causes any trouble, but you should set your monospace font at the system level to alleviate this issue.

jt3k commented 8 years ago

@ryanpcmcquen it is really so. but code-prettify allows you to customize the font using styles. Why don't you do it

jt3k commented 8 years ago

bump-up, and re-open issue

ryanpcmcquen commented 8 years ago

Adding a font-setting capability would mean having some kind of front-facing options menu. I really don't want to get in to that because it would add a lot of complexity to the code of this extension.

If you want to put together a pull request I will take a look, but honestly I don't think the font should be set by this extension.

ryanpcmcquen commented 8 years ago

You would probably be really happy using this extension in conjunction with workflowyCodeFormatter:

https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha?hl=en

jt3k commented 8 years ago

looks good ) thnx