[File] [PATCH] of Magdir/fonts for GEM GDOS font (*.fnt *.gft)

Christos Zoulas christos at zoulas.com
Sun May 5 16:44:45 UTC 2019


On May 4, 10:09pm, joerg.jen.der.ek at gmx.net (=?UTF-8?Q?J=c3=b6rg_Jenderek?=) wrote:
-- Subject: [File] [PATCH] of Magdir/fonts for GEM GDOS font (*.fnt *.gft)

| Hello,
| 
| some days ago i do some retro stuff. I run version 5.36 on
| GEM GDOS fonts with file extension fnt or gft. Such fonts are only
| described as "data".
| 
| So i add lines to Magdir/fonts. Some Information is found on
| fileformats.archiveteam.org website. So add comment line like
| # URL: http://fileformats.archiveteam.org/wiki/GEM_bitmap_font
| 
| There a link to file format specification is mentioned. So use that as
| reference, expressed by comment line like
| http://cd.textfiles.com/ataricompendium/BOOK/HTML/APPENDC.HTM#cnt
| 
| According to that side for many GEM GDOS fonts lightening mask and
| skewing mask has value 5555h ( or UU expressed as ASCII). This is
| expressed by magic line
|  62	ulelong		0x55555555
| Separate identifying and displaying part by lines like
|  >0	use		gdos-font
|  0	name		gdos-font
|  >0	uleshort	x		GEM GDOS font
| 
| Afterwards display file name extension and user defined mime type
| by lines:
|  !:mime	application/x-font-gdos
|  !:ext	fnt/gtf
| I also find eps file name extension like in example AA070GEP.EPS or
| AI360GEP.EPS. Do not know if this is an accident, because normally eps
| is used for encapsulated postscript.
| 
| Afterwards display font name like "University Bold" in example
| S2UNVB18.FNT by line
|  >4	string		x		%.32s
| 
| Afterwards shown font size, which was in range from 3 in example
| SLSS03CG.FNT to 48 in example H1CIRT48.FNT by line
|  >2	uleshort	x		%u
| Afterwards show unique ID by line
|  >0	uleshort	x		\b, ID 0x%4.4x
| If mentioned masks are not usual ( not 5555h ) show this by
| lines like
|  >62	uleshort	!0x5555		\b, lightening mask 0x%x
|  >64	uleshort	!0x5555		\b, skewing mask 0x%x
| 
| Some examples like ROYALK30.GFT have null values for mask fields.
| This is expressed bv line
|  62	ulelong		0
| Unfortunately this is not unique enough, but this is not a problem
| because identifying and showing parts are separated. So i add addition
| al
| test lines for such examples. So skip ISO 9660 CD-ROM images with many
| nulls by looking for low positive font size by line.
|  >2	uleshort	>2
| Highest size for fonts was 48. So check also for upper limit by line
|  >>2	uleshort	<49
| So skip misidentified DOS 2.0 backup id file like BACKUPID.@@@.
| At this stage some files like MS Windows icons like "download.ico" are
| still misidentified. So i also test for valid font name by additional
| line
|  >>>4	ubeshort	>0x1F00
| For my test collections now identifying is now unique. So now i call
| describing part by line
|  >>>>0	use		gdos-font
| 
| After applying the above mentioned modifications by patch
| file-5.36-fonts-gem.diff then fonts and other test files are described
| like:
| 
| AI360GEP.EPS: GEM GDOS font Dutch 36, ID 0x000e
| BACKM212.COM: DOS executable (COM)
| BACKUPID.@@@: DOS 2.0 backup id file, sequence 1, last disk
| BOX18.GFT:    GEM GDOS font Box Shadow 18, ID 0x0000,
| 	lightening mask 0x0, skewing mask 0x0
| COWBOY30.GFT: GEM GDOS font Cowboy 30, ID 0x0000,
| 	lightening mask 0x0, skewing mask 0x0
| download.ico: MS Windows icon resource - 1 icon,
| 	32x32, 16 colors, 4 bits/pixel
| H1CIRT48.FNT: GEM GDOS font Cirth 48, ID 0x0030
| plpbt.iso:    ISO 9660 CD-ROM filesystem data
| 	'Plop Boot Manager 5.0.14' (bootable)
| ROYALK30.GFT: GEM GDOS font Royal King 30, ID 0x0000,
| 	lightening mask 0x0, skewing mask 0x0
| S2UNVB18.FNT: GEM GDOS font University Bold 18, ID 0x0bd4
| SLSS03CG.FNT: GEM GDOS font Swiss 3, ID 0x0002
| 
| I hope my diff file can be applied in future version of
| file utility.

Committed, thanks as always!

christos


More information about the File mailing list