aboutsummaryrefslogtreecommitdiffstats
path: root/UefiLessonsPkg
diff options
context:
space:
mode:
authorKonstantin Aladyshev <aladyshev22@gmail.com>2021-11-09 13:01:09 +0300
committerKonstantin Aladyshev <aladyshev22@gmail.com>2021-11-09 13:03:03 +0300
commite621f88d259b8871ea62d2a7753d7475352cb774 (patch)
treeaca4dab1de5ab8bcf4f5cbadac7d9a60551388d7 /UefiLessonsPkg
parente31c53797383b1f978cd3aa21d8ba76f168c9829 (diff)
downloadUEFI-Lessons-e621f88d259b8871ea62d2a7753d7475352cb774.tar.gz
UEFI-Lessons-e621f88d259b8871ea62d2a7753d7475352cb774.tar.bz2
UEFI-Lessons-e621f88d259b8871ea62d2a7753d7475352cb774.zip
Add lesson 53
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Diffstat (limited to 'UefiLessonsPkg')
-rw-r--r--UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.c93
-rw-r--r--UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.inf31
-rw-r--r--UefiLessonsPkg/HIIAddRussianFont/RussianFont.c110
-rw-r--r--UefiLessonsPkg/HIIAddRussianFont/Strings.uni25
-rw-r--r--UefiLessonsPkg/UefiLessonsPkg.dec1
-rw-r--r--UefiLessonsPkg/UefiLessonsPkg.dsc1
6 files changed, 261 insertions, 0 deletions
diff --git a/UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.c b/UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.c
new file mode 100644
index 0000000..6ddab88
--- /dev/null
+++ b/UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.c
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2021, Konstantin Aladyshev <aladyshev22@gmail.com>
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#include <Library/UefiBootServicesTableLib.h>
+#include <Library/UefiLib.h>
+
+#include <Library/HiiLib.h>
+#include <Library/MemoryAllocationLib.h>
+#include <Library/BaseMemoryLib.h>
+
+
+extern EFI_WIDE_GLYPH gSimpleFontWideGlyphData[];
+extern UINT32 gSimpleFontWideBytes;
+extern EFI_NARROW_GLYPH gSimpleFontNarrowGlyphData[];
+extern UINT32 gSimpleFontNarrowBytes;
+
+
+UINT8* CreateSimpleFontPkg(EFI_WIDE_GLYPH* WideGlyph,
+ UINT32 WideGlyphSizeInBytes,
+ EFI_NARROW_GLYPH* NarrowGlyph,
+ UINT32 NarrowGlyphSizeInBytes)
+{
+ UINT32 PackageLen = sizeof(EFI_HII_SIMPLE_FONT_PACKAGE_HDR) + WideGlyphSizeInBytes + NarrowGlyphSizeInBytes + 4;
+ UINT8* FontPackage = (UINT8*)AllocateZeroPool (PackageLen);
+ *(UINT32*)FontPackage = PackageLen;
+
+ EFI_HII_SIMPLE_FONT_PACKAGE_HDR *SimpleFont;
+ SimpleFont = (EFI_HII_SIMPLE_FONT_PACKAGE_HDR*)(FontPackage + 4);
+ SimpleFont->Header.Length = (UINT32)(PackageLen - 4);
+ SimpleFont->Header.Type = EFI_HII_PACKAGE_SIMPLE_FONTS;
+ SimpleFont->NumberOfNarrowGlyphs = (UINT16)(NarrowGlyphSizeInBytes / sizeof(EFI_NARROW_GLYPH));
+ SimpleFont->NumberOfWideGlyphs = (UINT16)(WideGlyphSizeInBytes / sizeof(EFI_WIDE_GLYPH));
+
+ UINT8* Location = (UINT8*)(&SimpleFont->NumberOfWideGlyphs + 1);
+ CopyMem(Location, NarrowGlyph, NarrowGlyphSizeInBytes);
+ CopyMem(Location + NarrowGlyphSizeInBytes, WideGlyph, WideGlyphSizeInBytes);
+
+ return FontPackage;
+}
+
+
+EFI_STATUS
+EFIAPI
+UefiMain (
+ IN EFI_HANDLE ImageHandle,
+ IN EFI_SYSTEM_TABLE *SystemTable
+ )
+{
+ Print(L"Привет!\n");
+
+ UINT8* FontPackage = CreateSimpleFontPkg(gSimpleFontWideGlyphData,
+ gSimpleFontWideBytes,
+ gSimpleFontNarrowGlyphData,
+ gSimpleFontNarrowBytes);
+
+ EFI_HII_HANDLE Handle = HiiAddPackages(&gHIIAddRussianFontGuid,
+ NULL,
+ FontPackage,
+ HIIAddRussianFontStrings,
+ NULL);
+
+ FreePool(FontPackage);
+
+ if (Handle == NULL)
+ {
+ Print(L"Error! Can't perform HiiAddPackages\n");
+ return EFI_INVALID_PARAMETER;
+ }
+
+ Print(L"en-US ID=1: %s\n", HiiGetString(Handle, 1, "en-US"));
+ Print(L"en-US ID=2: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_HELLO), "en-US"));
+ Print(L"en-US ID=3: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_BYE), "en-US"));
+ Print(L"en-US ID=4: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_ALPHABET_UPPERCASE), "en-US"));
+ Print(L"en-US ID=5: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_ALPHABET_LOWERCASE), "en-US"));
+ Print(L"fr-FR ID=1: %s\n", HiiGetString(Handle, 1, "fr-FR"));
+ Print(L"fr-FR ID=2: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_HELLO), "fr-FR"));
+ Print(L"fr-FR ID=3: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_BYE), "fr-FR"));
+ Print(L"fr-FR ID=4: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_ALPHABET_UPPERCASE), "fr-FR"));
+ Print(L"fr-FR ID=5: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_ALPHABET_LOWERCASE), "fr-FR"));
+ Print(L"ru-RU ID=1: %s\n", HiiGetString(Handle, 1, "ru-RU"));
+ Print(L"ru-RU ID=2: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_HELLO), "ru-RU"));
+ Print(L"ru-RU ID=3: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_BYE), "ru-RU"));
+ Print(L"ru-RU ID=4: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_ALPHABET_UPPERCASE), "ru-RU"));
+ Print(L"ru-RU ID=5: %s\n", HiiGetString(Handle, STRING_TOKEN(STR_ALPHABET_LOWERCASE), "ru-RU"));
+
+ Print(L"Привет!\n");
+
+ return EFI_SUCCESS;
+}
+
diff --git a/UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.inf b/UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.inf
new file mode 100644
index 0000000..a49a9cb
--- /dev/null
+++ b/UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.inf
@@ -0,0 +1,31 @@
+##
+# Copyright (c) 2021, Konstantin Aladyshev <aladyshev22@gmail.com>
+#
+# SPDX-License-Identifier: MIT
+##
+
+[Defines]
+ INF_VERSION = 1.25
+ BASE_NAME = HIIAddRussianFont
+ FILE_GUID = 52a77b9c-cb4b-4e63-8293-d9686a2d7105
+ MODULE_TYPE = UEFI_APPLICATION
+ VERSION_STRING = 1.0
+ ENTRY_POINT = UefiMain
+
+[Sources]
+ HIIAddRussianFont.c
+ RussianFont.c
+ Strings.uni
+
+[Packages]
+ MdePkg/MdePkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ UefiLessonsPkg/UefiLessonsPkg.dec
+
+[LibraryClasses]
+ UefiApplicationEntryPoint
+ UefiLib
+ HiiLib
+
+[Guids]
+ gHIIAddRussianFontGuid
diff --git a/UefiLessonsPkg/HIIAddRussianFont/RussianFont.c b/UefiLessonsPkg/HIIAddRussianFont/RussianFont.c
new file mode 100644
index 0000000..957467d
--- /dev/null
+++ b/UefiLessonsPkg/HIIAddRussianFont/RussianFont.c
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2021, Konstantin Aladyshev <aladyshev22@gmail.com>
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+EFI_WIDE_GLYPH gSimpleFontWideGlyphData[] = {
+{ 0x00, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}
+};
+UINT32 gSimpleFontWideBytes = sizeof(gSimpleFontWideGlyphData);
+
+EFI_NARROW_GLYPH gSimpleFontNarrowGlyphData[] = {
+{ 0x400, 0x00, { 0x60,0x30,0x00,0xfe,0x66,0x62,0x60,0x68,0x78,0x68,0x60,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00}},
+{ 0x401, 0x00, { 0x66,0x66,0x00,0xfe,0x66,0x62,0x60,0x68,0x78,0x68,0x60,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00}},
+{ 0x402, 0x00, { 0x00,0x00,0x00,0xfc,0x64,0x60,0x60,0x6c,0x76,0x66,0x66,0x66,0x66,0x66,0xe6,0x0c,0x00,0x00,0x00}},
+{ 0x403, 0x00, { 0x0c,0x18,0x00,0xfe,0x66,0x62,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00}},
+{ 0x404, 0x00, { 0x00,0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc8,0xf8,0xc8,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00,0x00,0x00}},
+{ 0x405, 0x00, { 0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc0,0x60,0x38,0x0c,0x06,0x06,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x406, 0x00, { 0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00}},
+{ 0x407, 0x00, { 0x66,0x66,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00}},
+{ 0x408, 0x00, { 0x00,0x00,0x00,0x0f,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x409, 0x00, { 0x00,0x00,0x00,0xfc,0xd8,0xd8,0xd8,0xd8,0xdc,0xda,0xda,0xda,0xda,0xda,0xdc,0x00,0x00,0x00,0x00}},
+{ 0x40a, 0x00, { 0x00,0x00,0x00,0xd8,0xd8,0xd8,0xd8,0xd8,0xfc,0xda,0xda,0xda,0xda,0xda,0xdc,0x00,0x00,0x00,0x00}},
+{ 0x40b, 0x00, { 0x00,0x00,0x00,0xfc,0x64,0x60,0x60,0x60,0x7c,0x66,0x66,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00}},
+{ 0x40c, 0x00, { 0x0c,0x18,0x00,0xe6,0x66,0x66,0x6c,0x6c,0x78,0x78,0x6c,0x6c,0x66,0x66,0xe6,0x00,0x00,0x00,0x00}},
+{ 0x40d, 0x00, { 0x0c,0x18,0x00,0xc6,0xc6,0xce,0xce,0xde,0xde,0xf6,0xf6,0xe6,0xe6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x40e, 0x00, { 0x6c,0x38,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x40f, 0x00, { 0x00,0x00,0x00,0xee,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0xfe,0x10,0x10,0x00,0x00}},
+{ 0x410, 0x00, { 0x00,0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x411, 0x00, { 0x00,0x00,0x00,0xfe,0x66,0x62,0x60,0x60,0x7c,0x66,0x66,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00}},
+{ 0x412, 0x00, { 0x00,0x00,0x00,0xfc,0x66,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00}},
+{ 0x413, 0x00, { 0x00,0x00,0x00,0xfe,0x66,0x62,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00}},
+{ 0x414, 0x00, { 0x00,0x00,0x00,0x1e,0x36,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0xff,0xc3,0x81,0x00,0x00}},
+{ 0x415, 0x00, { 0x00,0x00,0x00,0xfe,0x66,0x62,0x68,0x68,0x78,0x68,0x60,0x60,0x62,0x66,0xfe,0x00,0x00,0x00,0x00}},
+{ 0x416, 0x00, { 0x00,0x00,0x00,0xd6,0xd6,0xd6,0xd6,0x7c,0x38,0x38,0x7c,0xd6,0xd6,0xd6,0xd6,0x00,0x00,0x00,0x00}},
+{ 0x417, 0x00, { 0x00,0x00,0x00,0x7c,0xc6,0x86,0x06,0x06,0x3c,0x06,0x06,0x06,0x86,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x418, 0x00, { 0x00,0x00,0x00,0xc6,0xc6,0xce,0xce,0xde,0xde,0xf6,0xf6,0xe6,0xe6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x419, 0x00, { 0x6c,0x38,0x00,0xc6,0xc6,0xce,0xce,0xde,0xde,0xf6,0xf6,0xe6,0xe6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x41a, 0x00, { 0x00,0x00,0x00,0xe6,0x66,0x66,0x6c,0x6c,0x78,0x78,0x6c,0x6c,0x66,0x66,0xe6,0x00,0x00,0x00,0x00}},
+{ 0x41b, 0x00, { 0x00,0x00,0x00,0x1e,0x36,0x36,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x41c, 0x00, { 0x00,0x00,0x00,0xc6,0xee,0xfe,0xfe,0xd6,0xd6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x41d, 0x00, { 0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x41e, 0x00, { 0x00,0x00,0x00,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x6c,0x38,0x00,0x00,0x00,0x00}},
+{ 0x41f, 0x00, { 0x00,0x00,0x00,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x420, 0x00, { 0x00,0x00,0x00,0xfc,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00}},
+{ 0x421, 0x00, { 0x00,0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00,0x00,0x00}},
+{ 0x422, 0x00, { 0x00,0x00,0x00,0x7e,0x7e,0x5a,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00}},
+{ 0x423, 0x00, { 0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x424, 0x00, { 0x00,0x00,0x00,0x38,0x10,0x7c,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0x7c,0x10,0x38,0x00,0x00,0x00,0x00}},
+{ 0x425, 0x00, { 0x00,0x00,0x00,0xc6,0xc6,0xc6,0x6c,0x6c,0x38,0x38,0x6c,0x6c,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x426, 0x00, { 0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xfe,0x06,0x02,0x00,0x00}},
+{ 0x427, 0x00, { 0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00}},
+{ 0x428, 0x00, { 0x00,0x00,0x00,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xfe,0x00,0x00,0x00,0x00}},
+{ 0x429, 0x00, { 0x00,0x00,0x00,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xff,0x03,0x01,0x00,0x00}},
+{ 0x42a, 0x00, { 0x00,0x00,0x00,0xf0,0xb0,0xb0,0x30,0x30,0x3c,0x36,0x36,0x36,0x36,0x36,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x42b, 0x00, { 0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xe6,0xd6,0xd6,0xd6,0xd6,0xd6,0xe6,0x00,0x00,0x00,0x00}},
+{ 0x42c, 0x00, { 0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x7c,0x66,0x66,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00}},
+{ 0x42d, 0x00, { 0x00,0x00,0x00,0x78,0xcc,0x86,0x06,0x26,0x3e,0x26,0x06,0x06,0x86,0xcc,0x78,0x00,0x00,0x00,0x00}},
+{ 0x42e, 0x00, { 0x00,0x00,0x00,0xcc,0xd6,0xd6,0xd6,0xd6,0xf6,0xd6,0xd6,0xd6,0xd6,0xd6,0xcc,0x00,0x00,0x00,0x00}},
+{ 0x42f, 0x00, { 0x00,0x00,0x00,0x7e,0xcc,0xcc,0xcc,0xcc,0x7c,0x6c,0x6c,0xcc,0xcc,0xcc,0xce,0x00,0x00,0x00,0x00}},
+{ 0x430, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x0c,0x0c,0x7c,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00}},
+{ 0x431, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x0c,0x78,0xc0,0xc0,0xfc,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x432, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00,0x00,0x00}},
+{ 0x433, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x66,0x62,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00}},
+{ 0x434, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x3c,0x6c,0x6c,0xcc,0xcc,0xcc,0xfe,0xc6,0x82,0x00,0x00}},
+{ 0x435, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x436, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd6,0xd6,0xd6,0x7c,0x7c,0xd6,0xd6,0xd6,0x00,0x00,0x00,0x00}},
+{ 0x437, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0x06,0x1c,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x438, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xce,0xde,0xf6,0xe6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x439, 0x00, { 0x00,0x00,0x00,0x00,0x6c,0x38,0x00,0xc6,0xc6,0xce,0xde,0xf6,0xe6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x43a, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe6,0x66,0x6c,0x78,0x78,0x6c,0x66,0xe6,0x00,0x00,0x00,0x00}},
+{ 0x43b, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x36,0x66,0x66,0x66,0x66,0x66,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x43c, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0xee,0xfe,0xd6,0xd6,0xd6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x43d, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x43e, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x43f, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x440, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdc,0x66,0x66,0x66,0x66,0x66,0x66,0x7c,0x60,0x60,0xf0,0x00}},
+{ 0x441, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x442, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x5a,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00}},
+{ 0x443, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x0c,0xf8,0x00}},
+{ 0x444, 0x00, { 0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x7c,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0x7c,0x10,0x10,0x10,0x00}},
+{ 0x445, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0x6c,0x38,0x38,0x6c,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x446, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0xfe,0x06,0x02,0x00,0x00}},
+{ 0x447, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x06,0x00,0x00,0x00,0x00}},
+{ 0x448, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xfe,0x00,0x00,0x00,0x00}},
+{ 0x449, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xd6,0xff,0x03,0x01,0x00,0x00}},
+{ 0x44a, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xb0,0x30,0x3c,0x36,0x36,0x36,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x44b, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xe6,0xd6,0xd6,0xd6,0xe6,0x00,0x00,0x00,0x00}},
+{ 0x44c, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x30,0x30,0x3c,0x36,0x36,0x36,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x44d, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0x06,0x1e,0x06,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x44e, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xcc,0xd6,0xd6,0xf6,0xf6,0xd6,0xd6,0xcc,0x00,0x00,0x00,0x00}},
+{ 0x44f, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x66,0x66,0x66,0x3e,0x36,0x66,0xe6,0x00,0x00,0x00,0x00}},
+{ 0x450, 0x00, { 0x00,0x00,0x00,0x60,0x30,0x18,0x00,0x7c,0xc6,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x451, 0x00, { 0x00,0x00,0x00,0x00,0xcc,0xcc,0x00,0x7c,0xc6,0xc6,0xfe,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x452, 0x00, { 0x00,0x00,0x00,0x60,0x60,0xf8,0x60,0x6c,0x76,0x66,0x66,0x66,0x66,0x66,0xe6,0x06,0x06,0x1c,0x00}},
+{ 0x453, 0x00, { 0x00,0x00,0x00,0x0c,0x18,0x30,0x00,0xfe,0x66,0x62,0x60,0x60,0x60,0x60,0xf0,0x00,0x00,0x00,0x00}},
+{ 0x454, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xf0,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x455, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7c,0xc6,0x60,0x38,0x0c,0x06,0xc6,0x7c,0x00,0x00,0x00,0x00}},
+{ 0x456, 0x00, { 0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00}},
+{ 0x457, 0x00, { 0x00,0x00,0x00,0x00,0x66,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00,0x00,0x00}},
+{ 0x458, 0x00, { 0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x0e,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3c,0x00}},
+{ 0x459, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfc,0xd8,0xd8,0xdc,0xda,0xda,0xda,0xdc,0x00,0x00,0x00,0x00}},
+{ 0x45a, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd8,0xd8,0xd8,0xfc,0xda,0xda,0xda,0xdc,0x00,0x00,0x00,0x00}},
+{ 0x45b, 0x00, { 0x00,0x00,0x00,0x60,0x60,0xf8,0x60,0x7c,0x66,0x66,0x66,0x66,0x66,0x66,0xe6,0x00,0x00,0x00,0x00}},
+{ 0x45c, 0x00, { 0x00,0x00,0x00,0x0c,0x18,0x30,0x00,0xe6,0x66,0x6c,0x78,0x78,0x6c,0x66,0xe6,0x00,0x00,0x00,0x00}},
+{ 0x45d, 0x00, { 0x00,0x00,0x00,0x60,0x30,0x18,0x00,0xc6,0xc6,0xce,0xde,0xf6,0xe6,0xc6,0xc6,0x00,0x00,0x00,0x00}},
+{ 0x45e, 0x00, { 0x00,0x00,0x00,0x00,0x6c,0x38,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7e,0x06,0x06,0x0c,0xf8,0x00}},
+{ 0x45f, 0x00, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xee,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0xfe,0x10,0x10,0x00,0x00}},
+};
+UINT32 gSimpleFontNarrowBytes = sizeof(gSimpleFontNarrowGlyphData); \ No newline at end of file
diff --git a/UefiLessonsPkg/HIIAddRussianFont/Strings.uni b/UefiLessonsPkg/HIIAddRussianFont/Strings.uni
new file mode 100644
index 0000000..07ca8cf
--- /dev/null
+++ b/UefiLessonsPkg/HIIAddRussianFont/Strings.uni
@@ -0,0 +1,25 @@
+//
+// Copyright (c) 2021, Konstantin Aladyshev <aladyshev22@gmail.com>
+//
+// SPDX-License-Identifier: MIT
+//
+
+#langdef en-US "English"
+#langdef fr-FR "Francais"
+#langdef ru-RU "Russian"
+
+#string STR_HELLO #language en-US "Hello!"
+ #language fr-FR "Bonjour!"
+ #language ru-RU "Привет!"
+
+#string STR_BYE #language en-US "Bye!"
+ #language fr-FR "Au revoir!"
+ #language ru-RU "До свидания!"
+
+#string STR_ALPHABET_UPPERCASE #language en-US "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ #language fr-FR "ABCDEFGHIJKLMNOPQRSTUVWXYZÀÈÙÉÂÊÎÔÛËÏÜŸÆŒÇ"
+ #language ru-RU "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЪЭЮЯ"
+
+#string STR_ALPHABET_LOWERCASE #language en-US "abcdefghijklmnopqrstuvwxyz"
+ #language fr-FR "abcdefghijklmnopqrstuvwxyzàèùéâêîôûëïüÿæœç"
+ #language ru-RU "абвгдеёжзийклмнопрстуфхцчшщьъэюя"
diff --git a/UefiLessonsPkg/UefiLessonsPkg.dec b/UefiLessonsPkg/UefiLessonsPkg.dec
index f1ef5a7..40b351c 100644
--- a/UefiLessonsPkg/UefiLessonsPkg.dec
+++ b/UefiLessonsPkg/UefiLessonsPkg.dec
@@ -20,6 +20,7 @@
gHIIStringsCGuid = { 0x8e0b8ed3, 0x14f7, 0x499d, { 0xa2, 0x24, 0xae, 0xe8, 0x9d, 0xc9, 0x7f, 0xa3 }}
gHIIStringsUNIGuid = { 0x6ee19058, 0x0fe2, 0x44ed, { 0x89, 0x1c, 0xa5, 0xd7, 0xe1, 0x08, 0xee, 0x1a }}
gHIIStringsUNIRCGuid = { 0x785693b4, 0x623e, 0x40fa, { 0x9a, 0x45, 0x68, 0xda, 0x38, 0x30, 0x89, 0xdd }}
+ gHIIAddRussianFontGuid = { 0x9fe2f616, 0x323c, 0x45a7, { 0x87, 0xa2, 0xdf, 0xef, 0xf5, 0x17, 0xcc, 0x66 }}
[Protocols]
gSimpleClassProtocolGuid = { 0xb5510eea, 0x6f11, 0x4e4b, { 0xad, 0x0f, 0x35, 0xce, 0x17, 0xbd, 0x7a, 0x67 }}
diff --git a/UefiLessonsPkg/UefiLessonsPkg.dsc b/UefiLessonsPkg/UefiLessonsPkg.dsc
index b97cbbe..4ddf8ff 100644
--- a/UefiLessonsPkg/UefiLessonsPkg.dsc
+++ b/UefiLessonsPkg/UefiLessonsPkg.dsc
@@ -69,6 +69,7 @@
UefiLessonsPkg/HIIStringsUNI/HIIStringsUNI.inf
UefiLessonsPkg/HIIStringsUNIRC/HIIStringsUNIRC.inf
UefiLessonsPkg/HIIStringsMan/HIIStringsMan.inf
+ UefiLessonsPkg/HIIAddRussianFont/HIIAddRussianFont.inf
[PcdsFixedAtBuild]
gUefiLessonsPkgTokenSpaceGuid.PcdMyVar32_2|44