fcrespo82 / atom-markdown-table-formatter

A simple markdown plugin to format tables.
MIT License
21 stars 7 forks source link

Get poor looks with non-monospace fonts #20

Closed reverland closed 8 years ago

reverland commented 8 years ago

I'm curious why it not works for me then I found...I use a non-monospaced font.

screenshot from 2015-11-19 00 03 37

However, its the beyond the web techniques, so maybe we can achieve a better looking formater for not monospace fonts.

I dont know if its a considerable thoughts.: )

lierdakil commented 8 years ago

It's not a great idea to use non-monospace font with Markdown or source code editor. There are many decent-looking free monospace fonts out there, and I highly recommend you take a look around.

Some examples from the top of my head (in no particular order):

It could be possible to slap together a grammar that would highlight those tables and a stylesheed that would apply monospace font to those, but... let's just say this would be far from optimal.

fcrespo82 commented 8 years ago

Yep, I agree with @lierdakil. I would recomment to use a monospace font instead.

reverland commented 8 years ago

@fcrespo82 @lierdakil Thanks, I'd like to close this issue, But maybe as a reminder for someone can't figure out why it isn't work as intended...: )

lierdakil commented 8 years ago

Actually, after looking at gfm grammar one more time, it already defines table spans. So you can conceivably add something like this to your stylesheet, if you really want to:

atom-text-editor::shadow .table.gfm {
    font-family: monospace;
}

I still don't think this is a great solution, but hey, you're free to do whatever you want ;)

Note: I don't think we should add this to package stylesheet, for a variety of reasons. But maybe we could add this trick into readme?

reverland commented 8 years ago

@lierdakil

Wowoww...Awesome!!! Its an interesting trick: )

Yeah, I tried it and found adding this to stylesheet may cause misplacement of lines or words, make the page looks a little strange if you choose a quite different font from monospace with other content.

Thank you lierdakil, atom is really a customizable editor!