Thursday at 06:41 AM5 days It might not be a texture file; I’m not entirely sure. It could also be a .ttf or .gfx file. I need to unpack the files, edit them, and then import them back in. Is there anyone who can help with this? fh2fonts.zip
Thursday at 09:23 AM5 days Supporter It looks like 2D/3D font. Not easy imo.Rough struct.//------------------------------------------------ //--- 010 Editor v14.0 Binary Template // // File: // Authors: // Version: // Purpose: // Category: // File Mask: // ID Bytes: // History: //------------------------------------------------ LittleEndian();OutputPaneClear(); local uint32 i,j,k,l; string FontName; //Skipped 128 bytes not sure what they are, could be an important FSeek(128); uint32 GlyphCount; uint32 Unknown_0; uint32 Unknown_1; uint32 KernCount; float Unknown_3; float Unknown_4; float Unknown_5; uint32 Unknown_6; uint32 Unknown_7; uint32 Unknown_8; uint32 Unknown_9; uint32 Unknown_10; uint32 Unknown_11; uint32 Unknown_12; uint32 Unknown_13; uint32 Unknown_14; struct { wchar_t Character[2]; float Unknown_0; uint32 Unknown_1; uint32 Unknown_2; uint32 Unknown_3; uint32 Unknown_4; uint32 Unknown_5; }GlyphDefinition[GlyphCount]<optimize=false>; if (KernCount != 0) { struct { wchar_t Character[2]; wchar_t CharacterKern[2]; uint32 Unknown_0; }GlyphKernDefinition[KernCount]<optimize=false>; } uint32 Glyph2DCount; struct { wchar_t Character[2]; uint32 VertexCount; uint32 IndexCount; if (VertexCount != 0) { struct { hfloat VPosX,VPosY,VPosZ,Opacity; }Glyph2DVector[VertexCount]<optimize=false>; struct { uint16 F1,F2,F3; }GlyphIndices[IndexCount / 3]<optimize=false>; } }Glyph2DDefinition[Glyph2DCount]<optimize=false>; Edited Thursday at 11:26 AM5 days by h3x3r
1 hour ago1 hr Localization A vfont is Forza Horizon 2's vector font format: each character is stored as a flat 2D triangle mesh rather than a texture or a normal TTF outline.Header: the font name, glyph and kerning counts, and standard font metrics (ascent, descent, line gap, units per em).Glyph table: one entry per character with its Unicode codepoint, advance width, and mesh size.Kerning table: pairs of characters with a spacing adjustment.Meshes: one per glyph, as vertices (four half floats each) plus a triangle index list.Each vertex holds an x and y position plus two extra values. The pixel shader runs a small formula on those values to find exactly where the glyph edge is, including true curves. That gives sharp, antialiased text at any size from one small mesh, which a texture atlas cannot do.The files are little endian, uncompressed, and have no magic number or version field. fontsettings.xml tells the game which fonts to load per language and which fallback font to use for characters the main Anthem fonts lack.I have uploaded a script below to unpack the content from the vfont.Optional: Install numpy and Pillow using python to also create a sheet of every glyph with its codepoint underneathpython unpack_vfont.py unpack every .vfont in the current folder into unpackedpython unpack_vfont.py Anthem_A.vfont unpack one filepython unpack_vfont.py fonts -o out unpack a folder into specific output folder name unpack_vfont.py
Create an account or sign in to comment