Try android assets and diplay font in bmp

This commit is contained in:
Edouard Dupin 2011-12-05 18:14:43 +01:00
parent eb20828922
commit 0879f1db9c
9 changed files with 403 additions and 3 deletions

BIN
Font/ebtfont/Monospace.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

129
Font/ebtfont/Monospace.ebt Normal file
View File

@ -0,0 +1,129 @@
name:Monospace
source:Monospace.bmp
# comment line ...
# size 54 largeur 33 space between letter 12
# unknow UTF8 code of the letter and start coordonate and size ==> 0x54 (33,45) (33,54)
0x00 (99,453) (33,54) # Error : Unknow the UTF8 element ...
# hexa UTF8 code of the letter and start coordonate and size ==> 0x54 (33,45) (33,54)
# ABCDEFGHIJKLMN
0x20 (0,7) (33,54) # space ...
0x41 (33,7) (33,54) # A
0x42 (66,7) (33,54) # B
0x43 (99,7) (33,54) # C
0x44 (132,7) (33,54) # D
0x45 (165,7) (33,54) # E
0x46 (198,7) (33,54) # F
0x47 (231,7) (33,54) # G
0x48 (264,7) (33,54) # H
0x49 (297,7) (33,54) # I
0x4A (330,7) (33,54) # J
0x4B (363,7) (33,54) # K
0x4C (396,7) (33,54) # L
0x4D (429,7) (33,54) # M
0x4E (462,7) (33,54) # N
#OPQRSTUVWXYZabc
0x4F (0,71) (33,54) # O
0x50 (33,71) (33,54) # P
0x51 (66,71) (33,54) # Q
0x52 (99,71) (33,54) # R
0x53 (132,71) (33,54) # S
0x54 (165,71) (33,54) # T
0x55 (198,71) (33,54) # U
0x56 (231,71) (33,54) # V
0x57 (264,71) (33,54) # W
0x58 (297,71) (33,54) # X
0x59 (330,71) (33,54) # Y
0x5A (363,71) (33,54) # Z
0x61 (396,71) (33,54) # a
0x62 (429,71) (33,54) # b
0x63 (462,71) (33,54) # c
#defghijklmnopqr
0x64 (0,135) (33,54) # d
0x65 (33,135) (33,54) # e
0x66 (66,135) (33,54) # f
0x67 (99,135) (33,54) # g
0x68 (132,135) (33,54) # h
0x69 (165,135) (33,54) # i
0x6A (198,135) (33,54) # j
0x6B (231,135) (33,54) # k
0x6C (264,135) (33,54) # l
0x6D (297,135) (33,54) # m
0x6E (330,135) (33,54) # n
0x6F (363,135) (33,54) # o
0x70 (396,135) (33,54) # p
0x71 (429,135) (33,54) # q
0x72 (462,135) (33,54) # r
#stuvwxyz1234567
0x73 (0,199) (33,54) # s
0x74 (33,199) (33,54) # t
0x75 (66,199) (33,54) # u
0x76 (99,199) (33,54) # v
0x77 (132,199) (33,54) # w
0x78 (165,199) (33,54) # x
0x79 (198,199) (33,54) # y
0x7A (231,199) (33,54) # z
0x31 (264,199) (33,54) # 1
0x32 (297,199) (33,54) # 2
0x33 (330,199) (33,54) # 3
0x34 (363,199) (33,54) # 4
0x35 (396,199) (33,54) # 5
0x36 (429,199) (33,54) # 6
0x37 (462,199) (33,54) # 7
#890&é~"#'{([-|è
0x38 (0,263) (33,54) # 8
0x39 (33,263) (33,54) # 9
0x30 (66,263) (33,54) # 0
0x26 (99,263) (33,54) # &
#0x (132,263) (33,54) # é
0x7E (165,263) (33,54) # ~
0x22 (198,263) (33,54) # "
0x23 (231,263) (33,54) # #
0x27 (264,263) (33,54) # '
0x7B (297,263) (33,54) # {
0x28 (330,263) (33,54) # (
0x5B (363,263) (33,54) # [
0x2D (396,263) (33,54) # -
0x7C (429,263) (33,54) # |
#0x (462,263) (33,54) # è
#`_\ç^à@)]=}
0x60 (0,335) (33,54) # `
0x5F (33,335) (33,54) # _
0x5C (66,335) (33,54) # \
#0x (99,335) (33,54) # ç
0x5E (132,335) (33,54) # ^
#0x (165,335) (33,54) # à
0x40 (198,335) (33,54) # @
0x29 (231,335) (33,54) # )
0x5D (264,335) (33,54) # ]
0x3D (297,335) (33,54) # =
0x7D (330,335) (33,54) # }
#0x (363,335) (33,54) # o chap
#0x (396,335) (33,54) # u chap
#0x (429,335) (33,54) # e chap
#0x (462,335) (33,54) # a chap
#$£*µ%!§:/
#0x (0,391) (33,54) # i chap
#0x (33,391) (33,54) # o trema
#0x (66,391) (33,54) # u trema
#0x (99,391) (33,54) # e trema
#0x (132,391) (33,54) # a trema
0x24 (165,391) (33,54) # $
#0x (198,391) (33,54) # £
0x2A (231,391) (33,54) # *
#0x (264,391) (33,54) # µ
#0x (297,391) (33,54) # ù
0x25 (330,391) (33,54) # %
0x21 (363,391) (33,54) # !
#0x (396,391) (33,54) # §
0x3A (429,391) (33,54) # :
0x2F (462,391) (33,54) # /
#;.,?<>²!+
0x3B (0,453) (33,54) # ;
0x2E (33,453) (33,54) # .
0x2C (66,453) (33,54) # ,
0x3F (99,453) (33,54) # ?
0x3C (132,453) (33,54) # <
0x3E (165,453) (33,54) # >
#0x (198,453) (33,54) # ²
#0x21 (231,453) (33,54) # ! ==> doublon ...
0x2B (264,453) (33,54) # +

View File

@ -100,10 +100,46 @@ void APP_Init(int argc, char *argv[])
//fontID = GetFontIdWithFileName("dataTest/TextMonospace.ebt");
}
*/
ewol::SetFontFolder("Font");
ewol::SetFontFolder("Font/");
//ewol::SetDefaultFont("freefont/FreeMono", 14);
ewol::SetDefaultFont("ebtfont/Monospace", 14);
ewol::theme::LoadDefault("dataTest/exemple.eol");
//ewol::theme::LoadDefault("dataTest/exemple.eol");
ewol::theme::LoadDefault("theme/exemple.eol");
etk::File tmpFile("/data/data/com.example.EwolActivity.app/assets/theme/exemple.eol");
if (tmpFile.Exist() ) {
EWOL_WARNING("file existed : " << tmpFile);
}
tmpFile = ("/data/data/com.example.EwolActivity/assets/theme/exemple.eol");
if (tmpFile.Exist() ) {
EWOL_WARNING("file existed : " << tmpFile);
}
tmpFile=("/data/com.example.EwolActivity.app/assets/theme/exemple.eol");
if (tmpFile.Exist() ) {
EWOL_WARNING("file existed : " << tmpFile);
}
tmpFile=("/data/com.example.EwolActivity/assets/theme/exemple.eol");
if (tmpFile.Exist() ) {
EWOL_WARNING("file existed : " << tmpFile);
}
tmpFile=("/data/data/com.example.ewolactivity.app/assets/theme/exemple.eol");
if (tmpFile.Exist() ) {
EWOL_WARNING("file existed : " << tmpFile);
}
tmpFile=("/data/data/com.example.ewolactivity/assets/theme/exemple.eol");
if (tmpFile.Exist() ) {
EWOL_WARNING("file existed : " << tmpFile);
}
tmpFile=("/data/com.example.ewolactivity.app/assets/theme/exemple.eol");
if (tmpFile.Exist() ) {
EWOL_WARNING("file existed : " << tmpFile);
}
tmpFile=("/data/com.example.ewolactivity/assets/theme/exemple.eol");
if (tmpFile.Exist() ) {
EWOL_WARNING("file existed : " << tmpFile);
}
myWindowsExample = new Plop();

View File

@ -157,7 +157,7 @@ void etk::File::SetCompleateName(etk::String &newFilename)
// Get the command came from the running of the program :
char cCurrentPath[FILENAME_MAX];
#ifdef __PLATFORM__Android
strcpy(cCurrentPath, "/data/" PACKAGE_NAME "/raw/");
strcpy(cCurrentPath, "/data/data/" PACKAGE_NAME "/assets//");
#else
if (!getcwd(cCurrentPath, FILENAME_MAX)) {
return;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -0,0 +1,129 @@
name:Monospace
source:Monospace.bmp
# comment line ...
# size 54 largeur 33 space between letter 12
# unknow UTF8 code of the letter and start coordonate and size ==> 0x54 (33,45) (33,54)
0x00 (99,453) (33,54) # Error : Unknow the UTF8 element ...
# hexa UTF8 code of the letter and start coordonate and size ==> 0x54 (33,45) (33,54)
# ABCDEFGHIJKLMN
0x20 (0,7) (33,54) # space ...
0x41 (33,7) (33,54) # A
0x42 (66,7) (33,54) # B
0x43 (99,7) (33,54) # C
0x44 (132,7) (33,54) # D
0x45 (165,7) (33,54) # E
0x46 (198,7) (33,54) # F
0x47 (231,7) (33,54) # G
0x48 (264,7) (33,54) # H
0x49 (297,7) (33,54) # I
0x4A (330,7) (33,54) # J
0x4B (363,7) (33,54) # K
0x4C (396,7) (33,54) # L
0x4D (429,7) (33,54) # M
0x4E (462,7) (33,54) # N
#OPQRSTUVWXYZabc
0x4F (0,71) (33,54) # O
0x50 (33,71) (33,54) # P
0x51 (66,71) (33,54) # Q
0x52 (99,71) (33,54) # R
0x53 (132,71) (33,54) # S
0x54 (165,71) (33,54) # T
0x55 (198,71) (33,54) # U
0x56 (231,71) (33,54) # V
0x57 (264,71) (33,54) # W
0x58 (297,71) (33,54) # X
0x59 (330,71) (33,54) # Y
0x5A (363,71) (33,54) # Z
0x61 (396,71) (33,54) # a
0x62 (429,71) (33,54) # b
0x63 (462,71) (33,54) # c
#defghijklmnopqr
0x64 (0,135) (33,54) # d
0x65 (33,135) (33,54) # e
0x66 (66,135) (33,54) # f
0x67 (99,135) (33,54) # g
0x68 (132,135) (33,54) # h
0x69 (165,135) (33,54) # i
0x6A (198,135) (33,54) # j
0x6B (231,135) (33,54) # k
0x6C (264,135) (33,54) # l
0x6D (297,135) (33,54) # m
0x6E (330,135) (33,54) # n
0x6F (363,135) (33,54) # o
0x70 (396,135) (33,54) # p
0x71 (429,135) (33,54) # q
0x72 (462,135) (33,54) # r
#stuvwxyz1234567
0x73 (0,199) (33,54) # s
0x74 (33,199) (33,54) # t
0x75 (66,199) (33,54) # u
0x76 (99,199) (33,54) # v
0x77 (132,199) (33,54) # w
0x78 (165,199) (33,54) # x
0x79 (198,199) (33,54) # y
0x7A (231,199) (33,54) # z
0x31 (264,199) (33,54) # 1
0x32 (297,199) (33,54) # 2
0x33 (330,199) (33,54) # 3
0x34 (363,199) (33,54) # 4
0x35 (396,199) (33,54) # 5
0x36 (429,199) (33,54) # 6
0x37 (462,199) (33,54) # 7
#890&é~"#'{([-|è
0x38 (0,263) (33,54) # 8
0x39 (33,263) (33,54) # 9
0x30 (66,263) (33,54) # 0
0x26 (99,263) (33,54) # &
#0x (132,263) (33,54) # é
0x7E (165,263) (33,54) # ~
0x22 (198,263) (33,54) # "
0x23 (231,263) (33,54) # #
0x27 (264,263) (33,54) # '
0x7B (297,263) (33,54) # {
0x28 (330,263) (33,54) # (
0x5B (363,263) (33,54) # [
0x2D (396,263) (33,54) # -
0x7C (429,263) (33,54) # |
#0x (462,263) (33,54) # è
#`_\ç^à@)]=}
0x60 (0,335) (33,54) # `
0x5F (33,335) (33,54) # _
0x5C (66,335) (33,54) # \
#0x (99,335) (33,54) # ç
0x5E (132,335) (33,54) # ^
#0x (165,335) (33,54) # à
0x40 (198,335) (33,54) # @
0x29 (231,335) (33,54) # )
0x5D (264,335) (33,54) # ]
0x3D (297,335) (33,54) # =
0x7D (330,335) (33,54) # }
#0x (363,335) (33,54) # o chap
#0x (396,335) (33,54) # u chap
#0x (429,335) (33,54) # e chap
#0x (462,335) (33,54) # a chap
#$£*µ%!§:/
#0x (0,391) (33,54) # i chap
#0x (33,391) (33,54) # o trema
#0x (66,391) (33,54) # u trema
#0x (99,391) (33,54) # e trema
#0x (132,391) (33,54) # a trema
0x24 (165,391) (33,54) # $
#0x (198,391) (33,54) # £
0x2A (231,391) (33,54) # *
#0x (264,391) (33,54) # µ
#0x (297,391) (33,54) # ù
0x25 (330,391) (33,54) # %
0x21 (363,391) (33,54) # !
#0x (396,391) (33,54) # §
0x3A (429,391) (33,54) # :
0x2F (462,391) (33,54) # /
#;.,?<>²!+
0x3B (0,453) (33,54) # ;
0x2E (33,453) (33,54) # .
0x2C (66,453) (33,54) # ,
0x3F (99,453) (33,54) # ?
0x3C (132,453) (33,54) # <
0x3E (165,453) (33,54) # >
#0x (198,453) (33,54) # ²
#0x21 (231,453) (33,54) # ! ==> doublon ...
0x2B (264,453) (33,54) # +

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

92
assets/theme/exemple.eol Normal file
View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<eol>
<!-- can have "color" and "group" that is consider as global ... -->
<color/>
<color name="MEGAMERDIQUE"/>
<color name="GenBG" val="#FF0000"/>
<color name="GenFG" val="#FF000055"/>
<color name="TestPlop" val="#0000FF55"/>
<color name="GenBorder" val="1.0;0.000512;1.0;0.755562535"/>
<color name="GenBorder" val="5.0;0.000512;1.0"/>
<group name="Gen Rect system ... ">
<rect color="..."
position="0.53;0.56"
size="0.22;0.11"
/>
<line color="..."
positionStart="0.53;0.56"
positionStop="0.22;0.11"
thickness="0.05"
/>
<!-- and more basic display -->
</group>
<!-- example of a single element -->
<element name="plop"
ratio="1.0"
ClipX="false"
ClipY="false"
internalElemStart="0.25;0.75"
internalElemStop="0.75;0.75">
<!--
note we have 5 methode to reference a color :
- #RRGGBB ==> in hexa 0x00<=x<=0xFF
- #RRGGBBAA ==> in hexa 0x00<=x<=0xFF
- R.R;G.G;B.B ==> in double 0<=x<=1
- R.R;G.G;B.B;A.A ==> in double 0<=x<=1
- &NameColor ==> search internal color of the element and after global color ...
-->
<color name="Background" val="#EEEEEEFF"/>
<color name="Red" val="#FF0000FF"/>
<color name="Green" val="#00FF00FF"/>
<color name="Border" val="0.0;0.000512;1.0;0.755562535"/>
<!--...-->
<group name="basicRect">
<rect color="..."
position="0.53;0.56"
size="0.22;0.11"
/>
<line color="..."
positionStart="0.53;0.56"
positionStop="0.22;0.11"
thickness="0.05"
/>
<!-- and more basic display -->
</group>
<!--...-->
<frame id="0" name="basic">
<rect colorBG="Background"
position="0.0;0.0"
size="1.0;1.0"
/>
<rect colorBorder="Red"
position="0.1;0.1"
size="0.25;0.25"
thickness="0.01"
/>
<line color="TestPlop"
positionStart="0.53;0.56"
positionStop="0.22;0.11"
thickness="0.01"
/>
<circle colorBG="Green"
position="0.75;0.75"
radius="0.25"
/>
</frame>
<frame id="0" name="hover">
<rect color="..."
position="0.53;0.56"
size="0.22;0.11"
/>
<link name="basicRect"/>
</frame>
<!--...-->
</element>
<!--...-->
</eol>

14
build.property Normal file
View File

@ -0,0 +1,14 @@
# This file is used to override default values used by the Ant build system.
#
# This file must be checked in Version Control Systems, as it is
# integral to the build system of your project.
# The name of your application package as defined in the manifest.
# Used by the 'uninstall' rule.
#application-package=com.example.myproject
# The name of the source folder.
#source-folder=Sources/base/android/java
# The name of the output folder.
#out-folder=Object_Android/bin