1Recovery Image Generator 2------------------------- 3 4This program uses java.awt.Graphics2D to generate the background text files used 5under recovery mode. And thus we don't need to do the manual work by running 6emulators with different dpi. 7 8# Usage: 9 `java -jar path_to_jar --image_width imageWidth --text_name textName --font_dir fontDirectory 10 --resource_dir resourceDirectory --output_file outputFilename` 11 12# Description of the parameters: 131. `imageWidth`: The number of pixels per line; and the text strings will be 14 wrapped accordingly. 152. `textName`: The description of the text string, e.g. "recovery_erasing", 16 "recovery_installing_security" 173. `fontDirectory`: The directory that contains all the support .ttf | .ttc 18 files, e.g. $OUT/system/fonts/ 194. `resourceDirectory`: The resource directory that contains all the translated 20 strings in xml format, e.g. bootable/recovery/tools/recovery_l10n/res/ 215. `outputFilename`: Path to the generated image. 22 23# Locales 24Supported locales and background texts are located in 25[tools/recovery_l10n/res/](../recovery_l10n/res/values). For each background text, the tool renders 26a localized image for every supported locale. 27 28Each individual localized image contains an encoded locale header string, and the rendered 29background text. The locale header string is generated by `Locale.forLanguageTag`. And sample 30result include `en-US`, `zh-CN`, etc. These individual images are then concatenated together to 31form the final resource image that locates in res/images, e.g. `install_text.png` 32