[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Dosemu practically full-screen




Huge thanks for this, Paul. It will probably be a while before I play
around with this myself, but it looks very promising.



On 12/05/2012 08:54 AM, Paul Lagasse wrote:
Rafe, I found this online but haven't had the chance to check it out; this is verbatim with my emendations in brackets: 15. TrueType fonts in X If you use Sarge, it is relatively easy to use TrueType fonts, for example from the packages ttf-bitstream-vera, ttf-freefont or msttcorefonts in X. These fonts can now be administrated through defoma, the Debian Font Manager. All you need to do is to install the package x-ttcidfont-conf: apt-get install x-ttcidfont-conf Afterwards you add a line for the TrueType directory to the Files section of the X configuration file /etc/X11/XF86Config-4, preferrably directly above all other FontPath entries: FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" [note: the above path/file (/etc/X11...) does not exist in Ubuntu 12.04. Fontpaths for X are listed in /etc/X11/fs/config, as far as I can tell; there is a section here for listing fontpaths. Interestingly, the defoma path is not listed, but I have access to fonts from defoma. I think these comments hold for 12.10 as well IIRC] 16. Installing your own TrueType fonts In Debian, fonts can be managed by defoma, the Debian Font Manager. It registers the Fonts to applications which tell defoma how to do this using a plugin. Examples are gs, fontconfig and also x-ttcidfont-conf which in turn makes the fonts available to X (see Tip 15). The advantage is that is sufficient to register the fonts to defoma, which will take care of the rest of the configuration. Here is a short walkthrough on how to do it: First you copy all your TrueType fonts to a suitable directory, for example /usr/local/share/fonts/truetype. Next you create a so called hints file for defoma which contains informations about the fonts. You do this using the defoma-hints program. Make sure that the libft-perl package is installed. After that you can create the hints file: defoma-hints -c --no-question truetype \ /usr/local/share/fonts/truetype/* \ > /etc/defoma/hints/ownfonts.hints Now you register this file to defoma: defoma-font register-all /etc/defoma/hints/ownfonts.hints The last thing you have to do is to apply the new configuration. The quickest way is to call defoma-reconfigure It updates the fonts database for all registered applications. To use the new fonts in your current X session, run xset fp rehash --from http://www.andreas-janssen.de/debian-tipps-sarge.html.en#a15 Rafe, I don't know whether mkfontdir and xset fp rehash are necessarily needed. I didn't need need to use either when I copied the files from 12.04 to 12.10 (the defoma directory files). The caveat is that there was already a font.dir file (the product of running mkfontdir) and a fonts.scale file (don't think mkfontdir will produce this; mkfontscale will and does as well what mkfontdir does, but it doesn't seem to operate on TTF files from what I read). But xset fp rehash was clearly unneeded, in the sense that I did not run it myself after copying the fonts to 12.10. I know this contradicts what is said just above. I tried copying my old defoma font files from 8.04 to 12.04, putting them in an appropriate X11 directory (not a defoma directory); they already have fonts.dir and fonts.scale files, so I didn't worry about mkfontdir or mkfontscale (a mistake perhaps); the folder also has encodings.dir and fonts.alias files. I ran xset fp rehash, but saw no changes when I looked in the results of xlsfonts etc, though the same command shows DejaVu (one of the fonts in 8.04 and 12.04) in 8.04. So I spent I little time doing a little more online research, and came up with the above description of how to use defoma. It looks promising, but I won't be playing with it for a while, so I thought I'd pass it on in case it interests you. Paul On 12/04/2012 08:07 AM, Raphael wrote:
Paul -- Is it possible that the missing step involves mkfontdir and xset fp rehash? Not that I really understand what those involve, but I've come across references in preparing fonts for X. It would be great if we could really figure this out and document it. For one thing, when I was playing around, I came across some pretty compelling-looking fonts -- like a Courier 12, I think. (In my case, they weren't completely usable out of the box, because they substituted some of the XyWrite borders with things like accented characters -- but I think that's something I *think* I could fix within Xy, if I can remember how.) As windowed Xy, they promised to be very handsome, and even if they aren't scalable, if one could specify the correct size, you could create an all-but-full-screen Xy -- that is, a Xy window which occupied the entire screen but still allowed full access to the Linux desktop. Does x-ttcidfont-conf create the new font from the original ttf file? My dosemu fonts, which are in /usr/share/fonts/X11/misc/dosemu, all end in *.pcf.gz -- I guess these come out-of-the-box and prepped for dosemu. But there are in /usr/share/fonts altogether 1149 of these, and since one can apparently make use of several dozen of these without strain -- why not? With that in mind -- when you toyed with your screen font sizes, was it just trying out various sizes? In my limited experimentation the other day, I tried substituting proportional values, somewhat as you had suggested for Andale-Mono, but I didn't have much luck. In a way, the fact that tools such as defoma have not been deprecated might be a good sign for dosemu down the road. I don't really understand what Wayland is going to do -- I guess eventually it will displace X, or a lot of parts of it -- but if it's still important for Debian to preserve these somewhat arcane packages, you'd have to see it as a pretty good sign that the possibility for DOS emulation will remain for quite some time. -Rafe On 12/03/2012 10:31 PM, Paul Lagasse wrote:
Rafe, On 12/03/2012 09:24 AM, Raphael wrote:
Are you happy with the result?
Yes, I am, but I am used to using a windowed Xy4.
Having said that, just playing around with the nonscaling xfonts that are available makes me curious to try the MS fonts out. However, I'd actually be more interested in the explanation than copying your fixed setup or trying it out blind -- I was getting ready to escalate to the dosemu listserv -- for one thing, I really want to know why these fonts never seem to register on my system, and I'm quite curious how you worked through it
Years ago, in 10.04 I'm pretty sure, I lost Deja Vu and other fonts that I was used to having available for Dosemu. I did a lot of reading online about making fonts available to X, and tried out xfs (X font server) and defoma (debian font manager) and somehow somewhere along the way I may have picked up access to Andale Mono (or it may have had nothing to do with me -- I was stumbling around without a lot of knowledge). But in any case, I revisited xfs and defoma on Sunday, and did some reading online again, and discovered where defoma's directories were, which I'd never known before. In /var/lib/defoma's subdirectories I discovered x-ttcidfont-conf.d (folder), whose subcontents included a link to Andale Mono and fonts.scale and fonts.dir files with references similar to: Andale_Mono.ttf -monotype-andale mono-medium-r-normal--0-0-0-0-m-0-iso8859-2 I knew that these fonts.* files were important to making the fonts available to X from my earlier and recent reading, but that's the sum of my knowledge, except that lines like the above were the sort of output I was looking for when I ran xlsfonts ....|sort|uniq> scalable_fonts. So I figured that here, in /var/lib/defoma, was where I was getting my 12.04 Andale Mono for Dosemu from (from previous rooting around in /usr/share/fonts I knew that I'd never found the right fonts.* files there). I guess that in installing 12.04 over 10.04 I'd retained access to Andale Mono that I'd acquired in 10.04, which may be why I have it in 12.04 and you don't. So, in 12.10 I installed defoma and x-ttcidfont-conf, which recreated the directory structure of /var/lib/defoma/x-ttcidfont-conf.d, but did not recreate the link to Andale Mono or the fonts.* files. So I went with my other option, which was to copy from one computer to the other the defoma files, via a defoma.tar.gz file, replacing all the contents of /var/lib/defoma in 12.10 (the directory structure that the defoma etc installation had created in 12.10 was the same, but with fewer folders and no files). And things worked. I've since recalled that on my wife's portable I'd left 8.04 installed alongside 10.04 when I upgrade her machine, and looking there today discovered in /var/lib/defoma/... links to DejaVu and other fonts I used to have. I don't know if I can incorporate or somehow use the settings from 8.04 to access DejaVu in Dosemu again, but I've compressed her old /var/lib/defoma directory for playing with at sometime in the future. Paul