-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
READ-BDF create FONTDESCRIPTOR and write DISPLAYFONT files #2015
base: master
Are you sure you want to change the base?
READ-BDF create FONTDESCRIPTOR and write DISPLAYFONT files #2015
Conversation
Can write DISPLAYFONTFILE format ("STRIKE") files for the charsets. It still needs a bit more fine-tuning, and waiting for prerequisite PRs to be merged.
…SETINFO. Add ability to use mapping of Unicode charcode to unknown XCCS charcode in the private space.
…anized by charset-like (8-bit splitting of charcode) of Unicode encoding value. Needs more testing!
…write-DISPLAYFONT-files
This seems to be working well. It is doing some extra work to allow checking of mapping of Unicode to XCCS. Here is the file I'm testing with (renamed from .BDF to .TXT for GitHub): CU12.TXT (IN-PACKAGE "BDF")
; Argument to READ-BDF below is path to CU12.TXT (or .BDF if you renamed it), probably as a string
(TIME (PROG1 T (SETQ CU12 (READ-BDF path-to-CU12))))
; (PROG1 T is because the BDF-FONT structure prints a LOT!
; Next generate FONTDESCRIPTORs and the .DISPLAYFONT files for 2 fonts
; Final "path-to-put-files" is the directory in which to put the .DISPLAYFONT files. Each charset its own directory: c0
(TIME (SETQ CU12-FONTINFO (MULTIPLE-VALUE-LIST (WRITE-BDF-TO-DISPLAYFONT-FILES CU12 path-to-put-files)))) Here's the TIME output for the 2 expressions above:
I used (IL:FILESLOAD IL:FONTSAMPLER)
(SETQ CU12-FD (FIRST CU12-FONTINFO))
(SETQ CU12-CSETS (SECOND CU12-FONTINFO))
(SETQ CU12-UM-FD (THIRD CU12-FONTINFO))
(SETQ CU12-UM-CSETS (FOURTH CU12-FONTINFO))
(IL:|FontSample| CU12-FD CU12-CSETS "ClearlyU.pdf")
(IL:|FontSample| CU12-UM-FD CU12-UM-CSETS "ClearlyU-Unmapped.pdf") Here are the 2 pdf files I got from this: It does appear that there are some strange things in the mappings. |
With respect to There were some comments in the Unicode PR that the tables we have for 164 and 165 are goofy. 164 for example had a bunch of 165 codes in it, which I removed. Some of the remaining didn't match what I see in the XCCS document, which I left for another day. |
Can you say more about the unmapped codes? These are Unicode codes with glyphs that our tables don't map to XCCS codes? What actually happens when you encounter one of those? UTOXCODE (without the ?) will fake up an XCCS code, but that will only persist in the current system. If you are making up a permanent XCCS mapping for such unicodes, should we write them out into a mapping file that essentially acts as an extension to XCCS (or MCCS)? Or is something else going on? |
@rmkaplan Correct. These are the code which don't map to XCCS codes. (I.e., |
…oes NO mapping from Unicode to XCCS. All glyphs are at the Unicode encoding positions. Any glyphs with Unicode encoding > xFFFF are not included in the FONTDESCRIPTOR or DISPLAYFONT files.
Added option to create and write files for RAW All glyphs are at the Unicode encoding positions. This should be useful to see all glyphs in a BDF font (using (Other than needing documentation, this seems ready to be made not DRAFT. Other people testing it would be nice!) |
Now can create the
FONTDESCRIPTOR
with all non-empty charsets.Can write
DISPLAYFONTFILE
format ("STRIKE") files for the charsets.Correct handling of ASCENT and DESCENT by
FILEDESCRIPTOR
not per-CHARSETINFO
.Add ability to use mapping of Unicode charcode to unknown XCCS charcode in the private space.
Create 2nd
FONTDESCRIPTOR
for unmapped Unicode to XCCS charcodes, organized by charset-like (8-bit splitting of charcode) of Unicode encoding value.Needs more testing.