silexlabs / Cocktail

An HTML/CSS rendering engine for the Haxe language
http://www.silexlabs.org/haxe/cocktail/
Other
192 stars 34 forks source link

Font [BUG] #403

Open Espigah opened 10 years ago

Espigah commented 10 years ago

PureAS3: [...]

font face="comicfont" color="green" size="5">Comic-teste 0</ font span style=" font-family:comic-teste style=color:red">Comic-teste 1 </ span span style=" font-family:comic sans ms,cursive;">Comic-teste 4</ span

nothing works! =/

Espigah commented 10 years ago

try_font

yanhick commented 10 years ago

This won't work for now as @font-face is not implemented. You can embed font when using OpenFL though, check this example : https://github.com/silexlabs/Cocktail/tree/master/samples/10-embedded_font

Espigah commented 10 years ago

I returned it! =) I'm using pure as3 (without openfl) I'm trying to use something from google fonts

As3Project, tried this: [Embed(source="lib/Diplomata-Regular.ttf", fontName = "Diplomata",.......

And this: cssRules = "#content4 {font-family:'Diplomata';}"; myStyle = new CSSStyleSheet(cssRules, PropertyOriginValue.USER_AGENT); document.addStyleSheet(myStyle);

any idea how to help me?

Espigah commented 10 years ago

now...I tried to use a swf generated with openfl + embedded asset/font and uses it.... inside Font.registerFont i see asset/MyFont, but...not working

Espigah commented 10 years ago

untitled-1

Espigah commented 10 years ago

@yanhick some tips on how to do in FlashDevelop?

Espigah commented 10 years ago

assets path="assets/KatamotzIkasi.ttf" rename="KatamotzIkasi.ttf" glyphs="32-255" / doesn't work for me =/

I try this -> assets path="assets" rename="assets" include="*"

miraculouslyWorked

yanhick commented 10 years ago

No sorry, I haven't been using FlashDevelop for a long time.

Cool that you could get it to work !

2014-07-06 21:07 GMT+02:00 Fabricio notifications@github.com:

assets path="assets/KatamotzIkasi.ttf" rename="KatamotzIkasi.ttf" glyphs="32-255" / doesn't work for me =/

I try this -> assets path="assets" rename="assets" include="*">

miraculouslyWorked

— Reply to this email directly or view it on GitHub https://github.com/silexlabs/Cocktail/issues/403#issuecomment-48120377.

Espigah commented 10 years ago

FlashDevelop - ok! something curious is happening... works fine when I have the font installed else if uninstall the font cause error because the width is crazy

Espigah commented 10 years ago

fonts_i2

Espigah commented 10 years ago

fonts_n2

Espigah commented 10 years ago

My goal is change the font using the swc , ie, embedding by way of as3.

fsimoes commented 10 years ago

@yanhick Any news about this?