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