Starling Demo warning

Hello,

When I compile the Starling Demo, i have this warning :

openfl test html5 -final
Warning: Could not find generated font file "bin/html5/obj/webfont/DejaVuSans.eot"
Warning: Could not find generated font file "bin/html5/obj/webfont/DejaVuSans.woff"
Warning: Could not find generated font file "bin/html5/obj/webfont/DejaVuSans.svg"
Warning: Could not find generated font file "bin/html5/obj/webfont/Ubuntu-R.eot"
Warning: Could not find generated font file "bin/html5/obj/webfont/Ubuntu-R.woff"
Warning: Could not find generated font file "bin/html5/obj/webfont/Ubuntu-R.svg"

Thanks

Could you see if openfl test html5 -clean -final makes the warning go away?

The problem occurs with -clean

Hmm, what happens if you do a -clean -verbose build? I believe these fonts convert properly on my machine, but sometimes the webfont converter does fail on certain font files

“DejaVuSans.woff”, “DejaVuSans.svg”, “DejaVuSans.svg”, “Ubuntu-R.eot”, “Ubuntu-R.woff”, “Ubuntu-R.svg” are missing on Windows

Edge ignore it but Chrome doesn’t display my app
it’s necessary to remove in “./html5/bin/index.html”

src: url('assets/fonts/DejaVuSans.eot');
src: url('assets/fonts/DejaVuSans.eot?#iefix') format('embedded-opentype'),
url('assets/fonts/DejaVuSans.svg#my-font-family') format('svg'),
url('assets/fonts/DejaVuSans.woff') format('woff'),

I have similiar problem , but with Arial and Verdana fonts:

Warning: Could not find generated font file "bin/html5/obj/webfont/ARIAL.eot"
Warning: Could not find generated font file "bin/html5/obj/webfont/ARIAL.woff"
Warning: Could not find generated font file "bin/html5/obj/webfont/ARIAL.svg"
Warning: Could not find generated font file "bin/html5/obj/webfont/ARIALBD.eot"
Warning: Could not find generated font file "bin/html5/obj/webfont/ARIALBD.woff"
Warning: Could not find generated font file "bin/html5/obj/webfont/ARIALBD.svg"
Warning: Could not find generated font file "bin/html5/obj/webfont/VERDANA.eot"
Warning: Could not find generated font file "bin/html5/obj/webfont/VERDANA.woff"
Warning: Could not find generated font file "bin/html5/obj/webfont/VERDANA.svg"
Warning: Could not find generated font file "bin/html5/obj/webfont/VERDANAB.eot"
Warning: Could not find generated font file "bin/html5/obj/webfont/VERDANAB.woff"
Warning: Could not find generated font file "bin/html5/obj/webfont/VERDANAB.svg"
Warning: Could not find generated font file "bin/html5/obj/webfont/ARIALBDCFF.eot"
Warning: Could not find generated font file "bin/html5/obj/webfont/ARIALBDCFF.woff"
Warning: Could not find generated font file "bin/html5/obj/webfont/ARIALBDCFF.svg"
Warning: Could not find generated font file "bin/html5/obj/webfont/ARIALCFF.eot"
Warning: Could not find generated font file "bin/html5/obj/webfont/ARIALCFF.woff"
Warning: Could not find generated font file “bin/html5/obj/webfont/ARIALCFF.svg”

I actually used to get this warning a lot of times. I used to convert the fonts manually and put all the formats in the particular place. That stopped showing warnings at least. However, even after doing that, it used to be very hard to let openfl recognize the custom font being used. Not sure, if that is related with these warnings or not.

You don’t remove CSS in “./html5/bin/index.html”, font doesn’t appear on other system

you must add “DejaVuSans.ttf”, “DejaVuSans.eot”, “DejaVuSans.svg”, “DejaVuSans.woff” in font directory

@font-face {
	font-family: 'DejaVu Sans';
	src: url('assets/fonts/DejaVuSans.eot');
	src: url('assets/fonts/DejaVuSans.eot?#iefix') format('embedded-opentype'),
	url('assets/fonts/DejaVuSans.svg#my-font-family') format('svg'),
	url('assets/fonts/DejaVuSans.woff') format('woff'),
	url('assets/fonts/DejaVuSans.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}
var format = new TextFormat ("DejaVu Sans'", 30, 0x7A0026);
var textField = new TextField ();
textField.defaultTextFormat = format;
textField.embedFonts = true;
textField.selectable = false;
textField.x = 50;
textField.y = 50;
textField.width = 200;
textField.text = "Hello World";
addChild (textField);

Huh, that’s strange. I’ve definitely converted fonts like this before.

What platform are you guys running? Sounds like the webfont converter might be failing entirely here

I tested on Android, ttf not work on this platform, my font is remplaced by a default font.

When I use “Times New Roman”, on Android in not the same font that Windows, I converted a part of Windows times.ttf to a personal font (“.ttf”, “.eot”, “.woff”, “.svg”).

What is “webfont converter” ? I have a font.ttf and in the bin folder I have a font.ttf, not “font.eot”, “font.woff”, “font.svg”, I created it manually.

I’m using HTML5 as target

What desktop platform are you using? We use a command-line converter to turn TTF (and some OTF) fonts into EOT, WOFF and SVG fonts for use on the web. You can add these other files to your final CSS manually using your own converter, but we try to automate this to make it simple to use. It sounds like the webfont converter is possibly failing to run well on certain systems, which would be another problem

I use Windows 10 pro, I have this warning
I use the commande line

openfl test html5 -final

What do you get if you try the following command?

openfl update html5 -clean -verbose

I get the following output on the Starling sample, related to the webfont generation:

 - Creating directory: bin/html5/obj/webfont
 - Copying file: assets/fonts/DejaVuSans.ttf -> bin/html5/obj/webfont/DejaVuSans.ttf
 - Running command: C:\Development\Haxe\lime/templates/bin/webify-windows.exe C:\Development\Haxe\starling\samples\demo\bin\html5\obj\webfont\DejaVuSans.ttf
Generating C:\Development\Haxe\starling\samples\demo\bin\html5\obj\webfont\DejaVuSans.eot
Generating C:\Development\Haxe\starling\samples\demo\bin\html5\obj\webfont\DejaVuSans.woff
Generating C:\Development\Haxe\starling\samples\demo\bin\html5\obj\webfont\DejaVuSans.svg
Available cmaps
------------------------------------------------------------------------------------
PlatformId | EncodingId | Description
0          | 3          | Unicode 2.0 and onwards semantics, Unicode BMP only
0          | 4          | Unicode 2.0 and onwards semantics, Unicode full repertoire
1          | 0          | Macintosh Roman 8-bit simple
3          | 1          | Microsoft Unicode BMP (UCS-2)
3          | 10         | Microsoft Unicode UCS-4
------------------------------------------------------------------------------------
Selecting platformId 3 encodingId 1 -- Microsoft Unicode BMP (UCS-2)
 - Copying file: assets/fonts/Ubuntu-R.ttf -> bin/html5/obj/webfont/Ubuntu-R.ttf
 - Running command: C:\Development\Haxe\lime/templates/bin/webify-windows.exe C:\Development\Haxe\starling\samples\demo\bin\html5\obj\webfont\Ubuntu-R.ttf
Generating C:\Development\Haxe\starling\samples\demo\bin\html5\obj\webfont\Ubuntu-R.eot
Generating C:\Development\Haxe\starling\samples\demo\bin\html5\obj\webfont\Ubuntu-R.woff
Generating C:\Development\Haxe\starling\samples\demo\bin\html5\obj\webfont\Ubuntu-R.svg
Available cmaps
-----------------------------------------------------------------------------
PlatformId | EncodingId | Description
0          | 3          | Unicode 2.0 and onwards semantics, Unicode BMP only
1          | 0          | Macintosh Roman 8-bit simple
3          | 1          | Microsoft Unicode BMP (UCS-2)
-----------------------------------------------------------------------------
Selecting platformId 3 encodingId 1 -- Microsoft Unicode BMP (UCS-2)
 - Detecting font name: bin/html5/obj/webfont/DejaVuSans.ttf -> "DejaVu Sans"
 - Detecting font name: bin/html5/obj/webfont/Ubuntu-R.ttf -> "Ubuntu"

if I use

openfl test html5 -final

if I use

openfl update html5 -clean -verbose

Microsoft Windows [version 10.0.15063]
(c) 2017 Microsoft Corporation. Tous droits réservés.

C:\Users\user\openfl\demo>openfl update html5 -clean -verbose

 .d88 88b.                             888888b 888
d88P" "Y88b                            888     888
888     888                            888     888
888     888 88888b.   .d88b.  88888b.  8888888 888
888     888 888 "88b d8P  Y8b 888 "88b 888     888
888     888 888  888 88888888 888  888 888     888
Y88b. .d88P 888 d88P Y8b.     888  888 888     888
 "Y88 88P"  88888P"   "Y8888  888  888 888     "Y888P
            888
            888

OpenFL Command-Line Tools (6.2.2-LGyW9H)

Initializing project...
Using project file: C:\Users\user\openfl\demo/project.lime
Reading Lime config: C:\Users\user\.lime\config.xml
Using target platform: HTML5
Running command: CLEAN
 - Removing directory: bin/html5/bin/assets/audio
 - Removing directory: bin/html5/bin/assets/fonts/1x
 - Removing directory: bin/html5/bin/assets/fonts
 - Removing directory: bin/html5/bin/assets/textures/1x
 - Removing directory: bin/html5/bin/assets/textures
 - Removing directory: bin/html5/bin/assets
 - Removing directory: bin/html5/bin/lib
 - Removing directory: bin/html5/bin/manifest
 - Removing directory: bin/html5/bin
 - Removing directory: bin/html5/haxe
 - Removing directory: bin/html5/obj/lib
 - Removing directory: bin/html5/obj/webfont
 - Removing directory: bin/html5/obj
 - Removing directory: bin/html5

Running command: UPDATE
 - Creating directory: bin/html5
 - Creating directory: bin/html5/bin
 - Creating directory: bin/html5/obj
 - Creating directory: bin/html5/obj/webfont
 - Copying file: assets/fonts/DejaVuSans.ttf -> bin/html5/obj/webfont/DejaVuSans.ttf
 - Running command: C:\HaxeToolkit\haxe\lib\lime/5^,7^,1/templates/bin/webify-windows.exe C:\Users\user\openfl\demo\bin\html5\obj\webfont\DejaVuSans.ttf
Generating C:\Users\user\openfl\demo\bin\html5\obj\webfont\DejaVuSans.eot
Generating C:\Users\user\openfl\demo\bin\html5\obj\webfont\DejaVuSans.woff
Generating C:\Users\user\openfl\demo\bin\html5\obj\webfont\DejaVuSans.svg
Available cmaps
------------------------------------------------------------------------------------
PlatformId | EncodingId | Description                                           
0          | 3          | Unicode 2.0 and onwards semantics, Unicode BMP only   
0          | 4          | Unicode 2.0 and onwards semantics, Unicode full repertoire
1          | 0          | Macintosh Roman 8-bit simple                          
3          | 1          | Microsoft Unicode BMP (UCS-2)                         
3          | 10         | Microsoft Unicode UCS-4                               
------------------------------------------------------------------------------------
Selecting platformId 3 encodingId 1 -- Microsoft Unicode BMP (UCS-2)
 - Copying file: assets/fonts/Ubuntu-R.ttf -> bin/html5/obj/webfont/Ubuntu-R.ttf
 - Running command: C:\HaxeToolkit\haxe\lib\lime/5^,7^,1/templates/bin/webify-windows.exe C:\Users\user\openfl\demo\bin\html5\obj\webfont\Ubuntu-R.ttf
Generating C:\Users\user\openfl\demo\bin\html5\obj\webfont\Ubuntu-R.eot
Generating C:\Users\user\openfl\demo\bin\html5\obj\webfont\Ubuntu-R.woff
Generating C:\Users\user\openfl\demo\bin\html5\obj\webfont\Ubuntu-R.svg
Available cmaps
-----------------------------------------------------------------------------
PlatformId | EncodingId | Description
0          | 3          | Unicode 2.0 and onwards semantics, Unicode BMP only
1          | 0          | Macintosh Roman 8-bit simple
3          | 1          | Microsoft Unicode BMP (UCS-2)
-----------------------------------------------------------------------------
Selecting platformId 3 encodingId 1 -- Microsoft Unicode BMP (UCS-2)
 - Detecting font name: bin/html5/obj/webfont/DejaVuSans.ttf -> "DejaVu Sans"
 - Detecting font name: bin/html5/obj/webfont/Ubuntu-R.ttf -> "Ubuntu"
 - Running command: neko C:\HaxeToolkit\haxe\lib\lime/5,7,1/svg.n process C:\HaxeToolkit\haxe\lib\openfl/6,2,2/templates/default/icon.svg 192 192 C:\Users\user\AppData\Local\Temp/temp_573659.png
 - Creating directory: bin/html5/bin/lib
 - Copying file: C:\HaxeToolkit\haxe\lib\lime/5,7,1/dependencies/howler.min.js -> bin/html5/bin/lib/howler.min.js
 - Copying file: C:\HaxeToolkit\haxe\lib\lime/5,7,1/dependencies/pako.min.js -> bin/html5/bin/lib/pako.min.js
 - Creating directory: bin/html5/bin/assets
 - Creating directory: bin/html5/bin/assets/audio
 - Copying file: assets/audio/wing_flap.mp3 -> bin/html5/bin/assets/audio/wing_flap.mp3
 - Copying file: assets/audio/wing_flap.ogg -> bin/html5/bin/assets/audio/wing_flap.ogg
 - Creating directory: bin/html5/bin/assets/textures
 - Creating directory: bin/html5/bin/assets/textures/1x
 - Copying file: assets/textures/1x/atlas.png -> bin/html5/bin/assets/textures/1x/atlas.png
 - Copying file: assets/textures/1x/atlas.xml -> bin/html5/bin/assets/textures/1x/atlas.xml
 - Copying file: assets/textures/1x/background.jpg -> bin/html5/bin/assets/textures/1x/background.jpg
 - Copying file: assets/textures/1x/compressed_texture.atf -> bin/html5/bin/assets/textures/1x/compressed_texture.atf
 - Creating directory: bin/html5/bin/assets/fonts
 - Creating directory: bin/html5/bin/assets/fonts/1x
 - Copying file: assets/fonts/1x/desyrel.fnt -> bin/html5/bin/assets/fonts/1x/desyrel.fnt
 - Copying file: assets/fonts/1x/desyrel.png -> bin/html5/bin/assets/fonts/1x/desyrel.png
 - Copying file: bin/html5/obj/webfont/DejaVuSans.ttf -> bin/html5/bin/assets/fonts/DejaVuSans.ttf
 - Copying file: bin/html5/obj/webfont/DejaVuSans.eot -> bin/html5/bin/assets/fonts/DejaVuSans.eot
 - Copying file: bin/html5/obj/webfont/DejaVuSans.woff -> bin/html5/bin/assets/fonts/DejaVuSans.woff
 - Copying file: bin/html5/obj/webfont/DejaVuSans.svg -> bin/html5/bin/assets/fonts/DejaVuSans.svg
 - Copying file: bin/html5/obj/webfont/Ubuntu-R.ttf -> bin/html5/bin/assets/fonts/Ubuntu-R.ttf
 - Copying file: bin/html5/obj/webfont/Ubuntu-R.eot -> bin/html5/bin/assets/fonts/Ubuntu-R.eot
 - Copying file: bin/html5/obj/webfont/Ubuntu-R.woff -> bin/html5/bin/assets/fonts/Ubuntu-R.woff
 - Copying file: bin/html5/obj/webfont/Ubuntu-R.svg -> bin/html5/bin/assets/fonts/Ubuntu-R.svg
 - Creating directory: bin/html5/bin/manifest
 - Copying template file: C:\HaxeToolkit\haxe\lib\openfl/6,2,2/templates/html5/template/index.html -> bin/html5/bin/index.html
 - Creating directory: bin/html5/haxe
 - Copying template file: C:\HaxeToolkit\haxe\lib\openfl/6,2,2/templates/haxe/ApplicationMain.hx -> bin/html5/haxe/ApplicationMain.hx
 - Copying template file: C:\HaxeToolkit\haxe\lib\lime/5,7,1/templates/haxe/ManifestResources.hx -> bin/html5/haxe/ManifestResources.hx
 - Copying template file: C:\HaxeToolkit\haxe\lib\openfl/6,2,2/templates/html5/hxml/debug.hxml -> bin/html5/haxe/debug.hxml
 - Copying template file: C:\HaxeToolkit\haxe\lib\openfl/6,2,2/templates/html5/hxml/final.hxml -> bin/html5/haxe/final.hxml
 - Copying template file: C:\HaxeToolkit\haxe\lib\openfl/6,2,2/templates/html5/hxml/release.hxml -> bin/html5/haxe/release.hxml

C:\Users\user\openfl\demo>

Just runned into this. If I use verbose it actually creates the files.

Though don’t know if it is Openfl or Haxeui, or a combination of both that happens when I use “html5 -clean -verbose” and It throws:
uncaught exception: [lime.utils.Assets] ERROR: There is no FONT asset with an ID of "Font Here"
when I try to do: btn_criar.customStyle.fontName = “Font Here” ;
btn_criar is an haxe.ui.components.Button

If I do : “trace(Font.enumerateFonts(false));” it says:
[{
src : null,
name : Roboto
},{
name : Roboto
},{
name : Font Here
},{
__fontPath : null
}]

so somehow Roboto is getting loaded twice in there too. Don’t know what is up with fontPath:null though.

EDIT 1: if I use -final __fontPath : null goes away.

Perhaps HaxeUI is expecting you to use an asset name, not a font name.

For example:

“assets/MyFont.ttf” -> “My Font”

OpenFL supports one of the following:

textFormat.font = "My Font";
...
textFormat.font = Assets.getFont ("assets/MyFont.ttf").fontName;

Perhaps Haxe UI is presuming that customStyle.fontName is a String for use with Assets.getFont?

1 Like

Yep. That was it. Ian also sorted it in git.