List all font files (TTF and OTF) found within the unzipped IPA directory.
The plugin operates by first defining the unzipped
directory within the scan path, where the contents of the IPA are extracted. It then executes a find
command to recursively search for all files ending with .ttf
or .otf
extensions within this unzipped
directory.
For each identified font file, the plugin extracts its filename, determines its path relative to the unzipped
directory, and retrieves its size. This information (name, relative path, and size) is then compiled into a list of objects.
Finally, this list of font entries is serialized into a JSON array and saved to a file named extracted-fonts.json
within the scan directory.
To retrieve the computed data, the fonts
plugin simply reads and parses the JSON content from the extracted-fonts.json
file. If the file doesn't exist or is empty, an empty array is returned.
[ { "name": "MyCustomFont.ttf", "path": "Payload/ExampleApp.app/MyCustomFont.ttf", "size": 123456 }, { "name": "AnotherFont.otf", "path": "Payload/ExampleApp.app/Frameworks/AnotherFont.otf", "size": 78901 } ]