-
Notifications
You must be signed in to change notification settings - Fork 65
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
--symbols all including all and only glyphs specified in --glyph-file #124
Comments
And with braille and blapinus font we're in this territory: |
That looks really sweet.
I'll see if we can add a |
Thinking in terms of bitmasks it seems to me the selection range should be logical: (Glyphs_in_font_file_if_supplied) AND (Glyphs_in_Predefined_Ranges OR Glyphs_in_user_supplied_ranges) Where the Glyphs_in_Predefined ranges are e.g. blocks, braille etc. Something something chafa_symbol_map_find_candidates( Aaa the whole thing is built around bitmasks? Not an array of glyphs that gets populated? This is real work to implement? |
It's just the selectors that're a bitfield. They're stored as a list and applied in order to each symbol, and the symbols passing through the "sieve" of multiple selectors get added to an array. It's not a lot of work to implement, in fact I did it just now :-) The commit adds a new selector class: "imported" ("import" works too). This selector matches glyphs from any The + and - operators aren't perfect. Long term it might be better to have something like s-expressions so you can do (imported & (ascii | braille)) to get only the ascii and braille symbols from the imported set. But alas, that would require writing a more competent parser. |
@clort81 Let me know if this works for you! |
Thank you hpjannson! Definitely works for not getting unmapped glyphs +++ No luck getting petscii diagonals yet. Oh and this perl script is useful to see the codepoints i get. chafa (etc) |unicp.pl |sort -u [EDIT] The experimental glyphs I am most interested in are the four between U+E1AB to E1B2, as these render with a slope of 45 degrees. Glyphs to render 45 degree angles with are regrettably missing from both the Unicode Consortium and Viznut's "Unscii" set. The pcf.gz file is here and is free to use. I drew all of these and declare them to be under SIL license, if any jurisdiction still considers tiny bitmap fonts to be under copyright. The new chafa with symbol-delimiting import was invoked with:
The results at 78 column width looked like this: Notice that I do not get any glyphs u+E1AB to u+E1B2 corresponding to 45 degree diagonal. I also tried with --symbols imported-braille to try to give the petscii a scoring advantage but that didn't work. In chafa/chafa-symbol-map.c , I noticed the ifdef 0 /* Private */ and it seems that setting the ifdef to 1 would hide the PUA range. Is that correct? Since it was 0, it seems that's not the cause of the failure. I've tried here to provide a test case free of complicating factors. If there's any interest, I can provide my complete 6x12 bitmap terminal font with retro-graphics and good latin coverage. Cheers! |
Thanks for all the info. I'll need some time to digest it. Two quick comments:
|
The PUA range is not explicitly blocked (see the block lists in chafa/chafa/internal/chafa-symbols.c Line 93 in 03affd6
+bad to the symbol selection.
|
Wow, I love this. You shouldn't be needing the |
Maybe anything in an imported glyph should override 'bad'? not sure. |
This is awesome. I love it too! It has much less tricky details than my k-means font (LOL). I was just too lazy to draw anything manually, but I did not realize a small amount of manually drawn glyph can already lead to such a wonderful result. |
I'm adding new glyphs and scoring them with chafa - i wouldn't say the font is finished. |
@cdluminate I improved the font loader, so it may be possible you'd get different (even better) results from your fontgen today :-) |
Great! I think I need to fine a time slot to get the python code updated 😆 |
The presence of PUA glyphs is likely deliberate; the user knows what they're doing. Unfortunately we don't have a way to determine if imported glyphs in these ranges are wide or narrow. We default to narrow. This is an additional fix for #124 (GitHub).
Done, fixed in 58f40ca. |
Shouldn't --symbols all with a specified --glyph-file include all but only glyphs specified in the glyph file? (font).
Seems to give me a lot of glyphs not extant in said font
Sample font:
Blapinus3ChafaSet-12.pcf.gz
Font for terminal (I may have made mistakes, if anyone finds any, let me know)
Blapinus3Medium-12-12.pcf.gz
The text was updated successfully, but these errors were encountered: