Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fonts with additional unicode characters #165

Open
meskarune opened this issue Jul 6, 2016 · 4 comments
Open

Add fonts with additional unicode characters #165

meskarune opened this issue Jul 6, 2016 · 4 comments

Comments

@meskarune
Copy link

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.

@buhman
Copy link
Member

buhman commented Jul 6, 2016

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.

@meskarune
Copy link
Author

meskarune commented Jul 6, 2016

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

@buhman
Copy link
Member

buhman commented Jul 6, 2016

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
Copy link
Member

buhman commented Jul 12, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants