-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Is it possible to support codepage 437? (e.g. PC graphics) #522
Comments
That is the way to do it. I don't think the included fonts contain these glyphs but that's how you would add the character set. |
Thanks mike, good to know I'm at least going in the right direction. It seems it might be possible to convert a ttf font from here which contains all the glyphs for all ASCII + PC graphics chars, and convert it to the afm/pfa files that htmldoc uses with e.g. Doing that would probably result in having the entire PDF file rendered like a VGA screen, though.. which might be hilarious, but perhaps ugly in printed form. The only other things I can think of are to find a ttf courier font that includes those extra unicode glyphs somehow, or try to splice them into an existing courier font. |
I maintain an MS-DOS based project whose manual occasionally uses PC graphics characters (cp-437) for things like tables, equipment wiring diagrams, schematics, and the like in lieu of images. The use is limited to the line/box drawing characters in the range 0xB0..0xDF.
I'm able to generate the 300 page manual just fine with scripts that convert the ASCII to html, but having trouble with the PC graphics in the htmldoc generated PDF.
I noticed htmldoc comes with several code page files, but not cp-437. Was wondering if I can make one myself by copying e.g. cp-1250, and then revising the byte code mappings for 0xB0 thru 0xDF as per the unicode equivalent 4 digit byte codes shown in this table (source):
![image](https://private-user-images.githubusercontent.com/6484779/328753122-c21370f8-f329-4dc9-82f1-dfba873d92af.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4MjczMzUsIm5iZiI6MTcxODgyNzAzNSwicGF0aCI6Ii82NDg0Nzc5LzMyODc1MzEyMi1jMjEzNzBmOC1mMzI5LTRkYzktODJmMS1kZmJhODczZDkyYWYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxOSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTlUMTk1NzE1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MDhhZDg4NGM1NGZlZmU3MzIzYjY2OGFjNTUwOWQ1NDVmMjhkMmQzMzk0ZTUwY2MwNTVlZTFhNjcwNzM4OWMxZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ymf1fjPykdErbgizpYZmnSVpAGN5GjAiJP4ZD7P6Q40)
So for instance, in the new cp-437 file:
I'm hoping if that's right, then I can then use
"---charset cp-437"
to possibly get satisfactory results with a fixed width font like Courier.Is that a good way to go about this? Or is there perhaps another way?
I don't know much about the cp-xxxx files yet, I'm just guessing at what they do, and hoping the fonts I'm mapping to would actually include those box drawing characters as part of their unicode support.
The text was updated successfully, but these errors were encountered: