]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Fonts.c
refine code.
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiToUefiHiiThunk / Fonts.c
CommitLineData
4259256b 1/**@file\r
2\r
3 This file contains the Glyph related function.\r
4\r
5Copyright (c) 2006 - 2008, Intel Corporation\r
6All rights reserved. This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16\r
17#include "HiiDatabase.h"\r
18\r
59336178 19\r
20UINT8 mGlyphBuffer[EFI_GLYPH_WIDTH * 2 * EFI_GLYPH_HEIGHT];\r
21\r
4259256b 22EFI_STATUS\r
23EFIAPI\r
24HiiGetGlyph (\r
25 IN EFI_HII_PROTOCOL *This,\r
26 IN CHAR16 *Source,\r
27 IN OUT UINT16 *Index,\r
28 OUT UINT8 **GlyphBuffer,\r
29 OUT UINT16 *BitWidth,\r
30 IN OUT UINT32 *InternalStatus\r
31 )\r
32/*++\r
33\r
34Routine Description:\r
35 Translates a Unicode character into the corresponding font glyph.\r
36 If the Source was pointing to a non-spacing character, the next Source[*Index]\r
37 character will be parsed and OR'd to the GlyphBuffer until a spacing character\r
38 is found in the Source. Since non-spacing characters are considered to be the\r
39 same pixel width as a regular character their BitWidth will be reflected correctly\r
40 however due to their special attribute, they are considered to be zero advancing width.\r
41 This basically means that the cursor would not advance, thus the character that follows\r
42 it would overlay the non-spacing character. The Index is modified to reflect both the\r
43 incoming array entry into the Source string but also the outgoing array entry after having\r
44 parsed the equivalent of a single Glyph's worth of data.\r
45\r
46Arguments:\r
47\r
48Returns:\r
49\r
50--*/\r
51{\r
52 ASSERT (FALSE);\r
59336178 53 return EFI_UNSUPPORTED;\r
4259256b 54}\r
55\r
56EFI_STATUS\r
57EFIAPI\r
58HiiGlyphToBlt (\r
59 IN EFI_HII_PROTOCOL *This,\r
60 IN UINT8 *GlyphBuffer,\r
61 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground,\r
62 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background,\r
63 IN UINTN Count,\r
64 IN UINTN Width,\r
65 IN UINTN Height,\r
66 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer\r
67 )\r
68{\r
69 ASSERT (FALSE);\r
59336178 70 return EFI_UNSUPPORTED;\r
4259256b 71}\r