From 6450acf0322b4288b1935a2dfc0c83fd0c3b3c56 Mon Sep 17 00:00:00 2001 From: Tianjie Date: Sun, 20 Dec 2020 19:46:11 -0800 Subject: Add doc for image_generator Bug: 143630837 Test: check preview Change-Id: I3b7ca52e2a13685a523901092df79b039e2ad96c --- tools/image_generator/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools') diff --git a/tools/image_generator/README.md b/tools/image_generator/README.md index 5d70354e4..1230ad510 100644 --- a/tools/image_generator/README.md +++ b/tools/image_generator/README.md @@ -19,3 +19,13 @@ emulators with different dpi. 4. `resourceDirectory`: The resource directory that contains all the translated strings in xml format, e.g. bootable/recovery/tools/recovery_l10n/res/ 5. `outputFilename`: Path to the generated image. + +# Locales +Supported locales and background texts are located in +[tools/recovery_l10n/res/](../recovery_l10n/res/values). For each background text, the tool renders +a localized image for every supported locale. + +Each individual localized image contains an encoded locale header string, and the rendered +background text. The locale header string is generated by `Locale.forLanguageTag`. And sample +result include `en-US`, `zh-CN`, etc. These individual images are then concatenated together to +form the final resource image that locates in res/images, e.g. `install_text.png` -- cgit v1.2.3