Conversation
Notices
-
chjara :hakasenyan: :verified: (chjara@snowdin.town)'s status on Friday, 17-Feb-2023 21:26:16 JST chjara :hakasenyan: :verified: wait, windows .fon files are in new executable format?? -
Moon (moon@shitposter.club)'s status on Friday, 17-Feb-2023 21:26:08 JST Moon @root @chjara dunno if you can see my post but thanks for the thorough explanation instead of just repeating that windows fonts are executables Disinformation Purveyor :verified_think: likes this. -
chjara :hakasenyan: :verified: (chjara@snowdin.town)'s status on Friday, 17-Feb-2023 21:26:08 JST chjara :hakasenyan: :verified: @Moon @root i mean, they are, but basically every windows binary format is, microsoft has an unhealthy obsession with throwing literally everything in NE/PE files -
yuki (root@possum.city)'s status on Friday, 17-Feb-2023 21:26:13 JST yuki @chjara@snowdin.town TL;DR it uses the NE (New Executable) format as a container format and has FNT data in the resource header - it doesn't necessarily need to actually have any executable code
-
yuki (root@possum.city)'s status on Friday, 17-Feb-2023 21:26:14 JST yuki @chjara@snowdin.town source (4.7)
Font resources are different from the other types of resources in
that they are not added to the resources of a specific application
program. Font resources are added to .EXE files that are renamed to
be .FON files. These files are libraries as opposed to applications.
Font resources use a resource group structure. Individual fonts are
the components of a font group. Each component is defined by a FONT
statement in the .RC file. The group header follows all components
and contains all information necessary to access a specific font.
The format of a font component resource is as follows: [Normal resource header (type = 8)] [Complete contents of the .FNT file follow as the resource body - - See the Windows SDK Reference for the format of the .FNT file]The group header for the fonts is normally last in the .RES file.
Note that unlike cursor and icon groups, the font group need not be
contiguous in the .RES file. Font declarations may be placed in the
.RC file mixed with other resource declarations. The group header is
added automatically by RC at the end of the .RES file. Programs
generating .RES files must add the FONTDIR entry manually. The group
header has the following structure: [Normal resource header (type = 7)] WORD NumberOfFonts; // Total number in .RES fileThe remaining data is repeated for every font in the .RES file.
WORD fontOrdinal; struct FontDirEntry { WORD dfVersion; DWORD dfSize; char dfCopyright[60]; WORD dfType; WORD dfPoints; WORD dfVertRes; WORD dfHorizRes; WORD dfAscent; WORD dfInternalLeading; WORD dfExternalLeading; BYTE dfItalic; BYTE dfUnderline; BYTE dfStrikeOut; WORD dfWeight; BYTE dfCharSet; WORD dfPixWidth; WORD dfPixHeight; BYTE dfPitchAndFamily; WORD dfAvgWidth; WORD dfMaxWidth; BYTE dfFirstChar; BYTE dfLastChar; BYTE dfDefaultChar; BYTE dfBreakChar; WORD dfWidthBytes; DWORD dfDevice; DWORD dfFace; DWORD dfReserved; char szDeviceName[]; char szFaceName[]; }; -
Moon (moon@shitposter.club)'s status on Friday, 17-Feb-2023 21:26:32 JST Moon @chjara @root it is more enlightening to say they are nonexecutable data in an executable container. i wonder if probably relying on the same loader for everything led to security bugs
-