mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 01:21:26 +08:00
Update a README
This commit is contained in:
+7
-7
@@ -269,7 +269,7 @@ bdf-convert.c
|
|||||||
2. Use the bdf-converter program to convert the BDF font to the NuttX
|
2. Use the bdf-converter program to convert the BDF font to the NuttX
|
||||||
font format. This will result in a C header file containing
|
font format. This will result in a C header file containing
|
||||||
definitions. That header file should be installed at, for example,
|
definitions. That header file should be installed at, for example,
|
||||||
graphics/nxfonts/nxfonts_myfont.h.
|
libnx/nxfonts/nxfonts_myfont.h.
|
||||||
|
|
||||||
Create a new NuttX configuration variable. For example, suppose
|
Create a new NuttX configuration variable. For example, suppose
|
||||||
you define the following variable: CONFIG_NXFONT_MYFONT. Then
|
you define the following variable: CONFIG_NXFONT_MYFONT. Then
|
||||||
@@ -324,7 +324,7 @@ bdf-convert.c
|
|||||||
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=2 EXTRADEFINES=$(EXTRADEFINES)
|
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=2 EXTRADEFINES=$(EXTRADEFINES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
6. nuttx/graphics/nxfonts/Make.defs. Set the make variable NXFSET_CSRCS.
|
6. nuttx/libnx/nxfonts/Make.defs. Set the make variable NXFSET_CSRCS.
|
||||||
NXFSET_CSRCS determines the name of the font C file to build when
|
NXFSET_CSRCS determines the name of the font C file to build when
|
||||||
NXFONTS_FONTID=2:
|
NXFONTS_FONTID=2:
|
||||||
|
|
||||||
@@ -335,12 +335,12 @@ bdf-convert.c
|
|||||||
NXFSET_CSRCS += nxfonts_bitmaps_myfont.c
|
NXFSET_CSRCS += nxfonts_bitmaps_myfont.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
7. nuttx/graphics/nxfonts/Makefile.sources. This is the Makefile used
|
7. nuttx/libnx/nxfonts/Makefile.sources. This is the Makefile used
|
||||||
in step 5 that will actually generate the font C file. So, given
|
in step 5 that will actually generate the font C file. So, given
|
||||||
your NXFONTS_FONTID=2, it needs to determine a prefix to use for
|
your NXFONTS_FONTID=2, it needs to determine a prefix to use for
|
||||||
auto-generated variable and function names and (again) the name of
|
auto-generated variable and function names and (again) the name of
|
||||||
the auto-generated file to create (this must be the same name that
|
the auto-generated file to create (this must be the same name that
|
||||||
was used in nuttx/graphics/nxfonts/Make.defs):
|
was used in nuttx/libnx/nxfonts/Make.defs):
|
||||||
|
|
||||||
ifeq ($(NXFONTS_FONTID),1)
|
ifeq ($(NXFONTS_FONTID),1)
|
||||||
NXFONTS_PREFIX := g_sans23x27_
|
NXFONTS_PREFIX := g_sans23x27_
|
||||||
@@ -351,9 +351,9 @@ bdf-convert.c
|
|||||||
GEN_CSRC = nxfonts_bitmaps_myfont.c
|
GEN_CSRC = nxfonts_bitmaps_myfont.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
8. graphics/nxfonts/nxfonts_bitmaps.c. This is the file that contains
|
8. graphics/libnx/nxfonts_bitmaps.c. This is the file that contains
|
||||||
the generic font structures. It is used as a "template" file by
|
the generic font structures. It is used as a "template" file by
|
||||||
nuttx/graphics/nxfonts/Makefile.sources to create your customized
|
nuttx/libnx/nxfonts/Makefile.sources to create your customized
|
||||||
font data set.
|
font data set.
|
||||||
|
|
||||||
#if NXFONTS_FONTID == 1
|
#if NXFONTS_FONTID == 1
|
||||||
@@ -367,7 +367,7 @@ bdf-convert.c
|
|||||||
Where nxfonts_myfont.h is the NuttX font file that we generated in
|
Where nxfonts_myfont.h is the NuttX font file that we generated in
|
||||||
step 2 using the bdf-converter tool.
|
step 2 using the bdf-converter tool.
|
||||||
|
|
||||||
9. graphics/nxfonts/nxfonts_getfont.c. Finally, we need to extend the
|
9. libnx/nxfonts/nxfonts_getfont.c. Finally, we need to extend the
|
||||||
logic that does the run-time font lookups so that can find our new
|
logic that does the run-time font lookups so that can find our new
|
||||||
font. The lookup function is NXHANDLE nxf_getfonthandle(enum nx_fontid_e fontid).
|
font. The lookup function is NXHANDLE nxf_getfonthandle(enum nx_fontid_e fontid).
|
||||||
The new font information needs to be added to data structures used by
|
The new font information needs to be added to data structures used by
|
||||||
|
|||||||
Reference in New Issue
Block a user