chrissimpkins / codeface

Typefaces for source code beautification
Other
6.17k stars 415 forks source link

New gallery specimen images for all fonts #119

Closed chrissimpkins closed 8 years ago

chrissimpkins commented 8 years ago

Proposed new Codeface gallery images that will be generated through a scripted approach with Pango/Cairo/Pygments for each typeface:

Text Specimen

text

Compact Text Specimen

compact

Light on Dark Syntax Highlighter

dark

Dark on Light Syntax Highlighter

light

This will simplify repository maintenance (no manual screenshots) and contributions via pull requests (anyone can generate the images with an install of the image generator dependencies using Python).

be5invis commented 8 years ago

How about an one-line or two-line "pangram-code" sample? Iosevka uses

float Fox.quick(h){ is_brown && it_jumps_over(doges.lazy) }

but this line does not cover numbers and punctuations.

tomByrer commented 8 years ago

I really like the idea of automation & different specimens. Could you add the following tests please?

Not sure if Powerline tests should be added; many in the wild are patched with same glyphs, but I wonder if newer PL fonts have unique symbols?

kevinSuttle commented 8 years ago

This is what I put in my Font Book specimen.

0oOl1LIi!|
, . “”’’`
:;Vv\/[]{}()
* - + <>=>

borrowed from slant http://www.slant.co/topics/67/~programming-fonts

chrissimpkins commented 8 years ago

How about an one-line or two-line "pangram-code" sample

@be5invis and get rid of text specimen #1 that includes all of these characters?

chrissimpkins commented 8 years ago

@tomByrer & @kevinSuttle : both great suggestions. I created a new repository where we can work on these specimens and attempt to achieve a consensus among developers about what they would like to see when they investigate new typefaces for source code development.

https://github.com/source-foundry/text-specimens

Feel free to fork and PR any suggested changes to the current specimens that we are using in Codeface. They are all included in that repository.

b and d, or p and q, n as u, m as w, d as q, p as b, f as t.

Sure, these would likely be most appropriate as a new line in the https://github.com/source-foundry/text-specimens/blob/master/semi-source/confusedchar-compact.txt specimen.

arrange the math symbols closer (~>==<-=+±*·x (yes, = is there 3 times))

Perhaps a new line in the https://github.com/source-foundry/text-specimens/blob/master/text/type-specimen-standard.txt specimen? I like how clean it currently appears and hate to clutter it with some of these tests. Let's think about where something like this would be most appropriate. Maybe in the same file as point 1 above.

Vertical line tests

This would be a simple addition to the https://github.com/source-foundry/text-specimens/blob/master/semi-source/confusedchar-compact.txt file

quotes

These are included in the current specimen https://github.com/source-foundry/text-specimens/blob/master/text/type-specimen-standard.txt that is active on the Codeface gallery

This is what I put in my Font Book specimen.

@kevinSuttle Where do you think that these would best fit in the current images. Do we need additional images? Brand new images will be a hard sell because of the current image size/browser load time balance that we have (or better stated, lack thereof). I would like to consolidate some of these additions into existing images if at all possible.

Join me over on the new repository and let's start reviewing some PR's with these modifications.

tomByrer commented 8 years ago

b and d, or p and q, n as u, m as w, d as q, p as b, f as t.

Sure, these would likely be most appropriate as a new line in the https://github.com/source-foundry/text-specimens/blob/master/semi-source/confusedchar-compact.txt specimen.

I just sent the PR, but now I wonder if "Confused char" would be better, since they are pairs+ that are confusing? Or am I confused for that example is for?

tomByrer commented 8 years ago

Let me think about the math symbols a bit; you seem to have many around anyway.

chrissimpkins commented 8 years ago

Thanks for the PR's Tom. They are both merged. I made a few minor additions to the line in the https://github.com/source-foundry/text-specimens/blob/master/semi-source/confusedchar-compact.txt specimen so that the line lengths match. I used additional character pairing examples from the dyslexia site that you linked in the PR.

:+1:

chrissimpkins commented 8 years ago

Let me think about the math symbols a bit

@tomByrer sounds good. let me know

chrissimpkins commented 8 years ago

Modified the confused char specimen file with some new character pairings from @kevinSuttle's suggestions above

See https://github.com/source-foundry/text-specimens/issues/3

tomByrer commented 8 years ago

Sweet! I made 3 minor tweaks to your edits (or is that a little twerk?)

chrissimpkins commented 8 years ago

@tomByrer :+1: merged!

chrissimpkins commented 8 years ago

New compact confused character specimen based upon the above changes:

test

chrissimpkins commented 8 years ago

@be5invis how about this change to include your pseudocode pangram?

test

van-de-bugger commented 8 years ago

Hi guys, thanks for the great gallery.

My question/proposal: is it possible to include few non-Latin characters to the specimen? I mean Greek, Cyrillic, maybe Hebrew, and so on. I do not request including full alphabets. One-two character from each alphabet would be very helpful to see if characters of these alphabets are present in the typeface. Otherwise I have to download and install a font just to see it does not cover required alphabet.

kevinSuttle commented 8 years ago

@van-de-bugger Is there a certain subset of characters you look for?

van-de-bugger commented 8 years ago

@kevinSuttle: Specifically, no.

But some Cyrillic and Greek characters looks like Latin, and some Cyrillic characters looks like Greek. It seems it's better to choose characters which are distinct for the alphabet. For example, it could be Ψω for Greek, Жы for Cyrillic. It depends on available space. If you can allocate more space, I can look for more characters.

chrissimpkins commented 8 years ago

We are dealing with this issue in the CJK gallery that is in development. The problem is that our automated approach (and most editors for screenshots) include fallback fonts to fill in gaps for missing glyphs. This is not the optimal way to demonstrate the presence of character set support until we find a different approach. I would be willing to add icons to indicate character set coverage if anyone is motivated to help work on this. If you are interested in viewing extended character set glyphs we could consider separate galleries as we doing with the CJK languages. See the cjk branch and #114 for an overview of how we are thinking about the display of other character sets.

tomByrer commented 8 years ago

IIRC Google fonts does this, & another website lists what range of characters.

But maybe a separate character listing for all non English languages would be good.

On Jan 6, 2016, at 3:19 PM, van-de-bugger notifications@github.com wrote:

Hi guys, thanks for the great gallery.

My question/proposal: is it possible to include few non-Latin characters to the specimen? I mean Greek, Cyrillic, maybe Hebrew, and so on. I do not request including full alphabets. One-two character from each alphabet would be very helpful to see if characters of these alphabets are present in the typeface. Otherwise I have to download and install a font just to see it does not cover required alphabet.

— Reply to this email directly or view it on GitHub.

van-de-bugger commented 8 years ago

@chrissimpkins

our automated approach (and most editors for screenshots) include fallback fonts to fill in gaps for missing glyphs.

Did you try fontimage program from fontforge package? It does not use fallback fonts. It is not suitable for syntax highlighters, but may be suitable for Text Specimen and Compact Text Specimen.

$ fontimage --text "Жы" --text "Ψω" --text "です" --o sample.png ./Hack-Regular.ttf

sample

I suppose Hack does not have Japanese glyphs?

kevinSuttle commented 8 years ago

You can test in the Emoji & Symbols panel in OSX.

Select 'Customize List' and choose the language sets.

screen shot 2016-01-06 at 10 08 23 pm screen shot 2016-01-06 at 10 07 27 pm
tomByrer commented 8 years ago

Great, does exactly what I hoped for; expose if - is not aligned, etc. I just noticed il1 is repeated twice, so one can be replaced if other matches are needed to be compared.

On Mon, Jan 4, 2016 at 2:04 PM, Chris Simpkins notifications@github.com wrote:

New compact confused character specimen based upon the above changes:

[image: test] https://cloud.githubusercontent.com/assets/4249591/12100412/cd3706d6-b2fc-11e5-9689-f8bf919e8a36.png

chrissimpkins commented 8 years ago

@van-de-bugger thanks for linking that. I will give it a try. Was not aware of it.

chrissimpkins commented 8 years ago

Added new gallery specimen images to the image-scripting branch README.md file (for Anonymous Pro only at this stage). This is the current iteration of our specimens and syntax highlighting schemes.

https://github.com/chrissimpkins/codeface/tree/image-scripting

chrissimpkins commented 8 years ago

@be5invis Belleve, the new gallery images will include your pangram specimen. See the example link that I posted above.

chrissimpkins commented 8 years ago

@van-de-bugger added new issue report where we can discuss your character set coverage suggestion #137

be5invis commented 8 years ago

@chrissimpkins Nice.

chrissimpkins commented 8 years ago

New gallery specimen images are now live in the master branch

kevinSuttle commented 8 years ago

Nice! Solid work @chrissimpkins.

chrissimpkins commented 8 years ago

@kevinSuttle Thanks Kevin. I really appreciate all of the contributions here. Thanks for your input and feedback. All of the images are automatically generated now so we can continue to iterate on the specimens if you have any new ideas. It takes a matter of minutes to recreate the entire gallery.

kevinSuttle commented 8 years ago

Now that is awesome. My pleasure.

kevinSuttle commented 7 years ago

Possibly still of value: https://typography.guru/journal/letters-symbols-misrecognition/