pb icon indicating copy to clipboard operation
pb copied to clipboard

Add fonts with additional unicode characters

Open meskarune opened this issue 8 years ago • 4 comments

Hell, I want to host some asciinema's for a git class on ptpb.pw but it doesn't support some unicode characters that are common in many people's terminal prompts. The website asciinema.org does have the font files available to do this. Here is an example:

https://asciinema.org/a/8puikku9gdeqnourh2me832cw

I don't mind changing out the unicode for ascii so it looks good on pb but it would be awesome if characters like these were supported. I use the symbola font on my own computer.

meskarune avatar Jul 06 '16 01:07 meskarune

I reuploaded that to https://ptpb.pw/t/VhtN, and I see that the fork symbol you're using is a square.

asciinema does load tons of fonts: https://ptpb.pw/wMnS.png, but I'm not sure what the loading mechanism is--it seems like sizzlejs loads these somehow, but even chromium seems a little confused (pointing at the doctype declaration for powerline symbols), and firefox doesn't display those requests at all.

The fork symbol is U+E0A0, which coincidentally seems to be provided by powerline-extra-symbols.

Also: nerd-fonts--clearly someone should tell this guy that this is 2016, and we have things like fontconfig, so this 'font patching' nonsense is completely dumb.

common in many people's terminal prompts

"common". Yeah. PRIVATE_USE_AREA glyphs are definitely common.

I use the symbola font on my own computer

I don't think this provides U+E0A0. If it did, you would see the glyph in your browser.

but it doesn't support some unicode characters that are

pb at the moment has no explicit "support" for any fonts/glyphs--what you get is probably whatever fontconfig returns for monospace, including any fallbacks.

I'm not convinced that pb should provide other strangeness by default.

buhman avatar Jul 06 '16 04:07 buhman

Private use area glyphs are common now in people's terminal prompts and vim status line's (for better or worse T_T) but just to be clear is the true solution just to set a monospace font in my browser that supports them?

I mean, I am removing all the unicode form the asciinema json anyways since enough people don't have unicode fonts on their computers (https://ptpb.pw/t/gkoq) but it would be a nice feature if a unicode font was available server side, even without the private area glyphs. I'm sure other people will be posting unicode text at some point to share with someone who doesn't have those fonts locally.

here is a UTF-8 test page: https://ptpb.pw/cdSe

meskarune avatar Jul 06 '16 11:07 meskarune

is the true solution just to set a monospace font in my browser that supports them?

Eh? I'm no fontconfig ninja, but I'm pretty sure any monospace-family font that exists in the fc-cache that has the requested glyph will be used as a fallback, even if the "default font" doesn't have that glyph. If that doesn't work, it's a browser bug probably.

since enough people don't have unicode fonts on their computers

So that's the real problem.

I think we should have @silverp1 weigh in on this.

buhman avatar Jul 06 '16 16:07 buhman

02:54:00 +jpettit buhman: dunno, providing them seems kind of cool

buhman avatar Jul 12 '16 14:07 buhman