You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Alexander Farber <al...@gmail.com> on 2016/07/26 12:47:33 UTC

Embedded fonts still shown in iOS app, but disappeared in Android app

Good afternoon!

There is a card game written in Apache Flex, which I am trying to keep
alive and while the iOS version still works ok, the Android app has
developed several visual problems over the last 1-2 years:

 1. The card suit symbols are not displayed correctly (my main problem!)
 2. The ActionBar text color is black
 3. The BusyIndicator stopped rotating

Here is my entire CSS file:

@namespace s "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";

s|ActionBar {
    chromeColor: #0066CC;
    color: #FFFFFF;   /* BUT WHY IS IT BLACK SOMETIMES? */
    titleAlign: center;
    textShadowColor: #000000;
    fontFamily: embFont;
}

@font-face {
    src: url("/assets/fonts/arial.ttf");
    fontFamily: embFont;
    embedAsCFF: false; /* required for StyleableTextField */
    unicodeRange:
        U+0020-U+0040, /* Punctuation, Numbers */
        U+2660-U+2666, /* Card suits - BUT THEY STOPPED WORKING */
        U+0041-U+005A, /* Upper-Case A-Z */
        U+0061-U+007A, /* Lower-Case a-z */
        U+0410-U+0451; /* Cyrillic */
}

s|LabelItemRenderer {
    fontFamily: embFont;
}

And here is an MXML code excerpt showing the callout with card suits and
the "dead" busy indicator:
<s:titleContent>
    <s:Label id="_titleTxt"
             fontWeight="bold"
             color="#FFFFFF"
             width="100%" />

    <s:BusyIndicator id="_busy"
                     includeInLayout="false"
                     visible="false" />
</s:titleContent>

<s:actionContent>
    <s:CalloutButton id="_leftBtn"
                     icon="{VIP}"
                     verticalPosition="after"
                     includeInLayout="false"
                     visible="false">
        <s:VGroup
            width="100%">
            <s:Label id="_left0" fontSize="{Preferans.FONT_SIZE}" />

            <s:Label id="_left1" fontSize="{Preferans.FONT_SIZE}"
color="#FF0000" />
            <s:Label id="_left2" fontSize="{Preferans.FONT_SIZE}" />

            <s:Label id="_left3" fontSize="{Preferans.FONT_SIZE}"
color="#FF0000" />
        </s:VGroup>
    </s:CalloutButton>
...
</s:actionContent>

Adding the following CSS code does not help:

s|LabelItemRenderer {
    fontFamily: embFont;
}

Also I keep installing and recompiling my app in Flash Builder 4.7 with
every new Apache Flex release and make sure, that I don't forget to install
the optional flex-fontkit.jar but that does not help.

Finally here are the screenshot demonstrating my problem:

http://stackoverflow.com/questions/38590070/embedded-fonts-still-shown-in-ios-app-but-disappeared-in-android-app

Thank you for any hints
Alex

Re: Embedded fonts still shown in iOS app, but disappeared in Android app

Posted by Alex Harui <ah...@adobe.com>.

On 7/26/16, 6:30 AM, "Harbs" <ha...@gmail.com> wrote:

>That makes it very hard to debug.
>
>Is it possible to disable that for debugging?

In that vein, you might want to comment out more and more of your app
until the problem goes away or you have a really simple test case.

Regarding embedded fonts, the usual things to check are that the actual
low-level text widget is a TextField or TextLine and the right embedAsCFF
value is set for that.  Various themes might swap in different text
widgets.

Regarding text color, most often some other CSS is taking precedence.  If
the low-level text widget is a TextField, some odd code could be setting
the textColor property and overriding the CSS, or if you are using
HTML/TLF markup, a color is specified in the markup.  There are ways to
find the reference to the text widget and dump information about the
styles and properties it has computed to get a better picture of what is
going on.

HTH,
-Alex


Re: Embedded fonts still shown in iOS app, but disappeared in Android app

Posted by Harbs <ha...@gmail.com>.
That makes it very hard to debug.

Is it possible to disable that for debugging?

On Jul 26, 2016, at 4:23 PM, Alexander Farber <al...@gmail.com> wrote:

> Hello -
> 
> On Tue, Jul 26, 2016 at 3:16 PM, Harbs <ha...@gmail.com> wrote:
> 
>> I think the first step is to confirm that it’s a Flex problem and not an
>> AIR problem.
>> 
>> What happens if you compile the app using an older version of the
>> Framework? Can you reproduce the problem using the emulator, or does this
>> only happen on physical devices?
>> 
>> 
> 
>> On Jul 26, 2016, at 3:47 PM, Alexander Farber <al...@gmail.com>
>> wrote:
>>> 
>>> 
>> http://stackoverflow.com/questions/38590070/embedded-fonts-still-shown-in-ios-app-but-disappeared-in-android-app
>> 
> 
> unfortunately, my app does not run on AIR simulator,
> because com.adobe.Vibration ANE does not run on it.
> 
> Regards
> Alex


Re: Embedded fonts still shown in iOS app, but disappeared in Android app

Posted by Alexander Farber <al...@gmail.com>.
Hello -

On Tue, Jul 26, 2016 at 3:16 PM, Harbs <ha...@gmail.com> wrote:

> I think the first step is to confirm that it’s a Flex problem and not an
> AIR problem.
>
> What happens if you compile the app using an older version of the
> Framework? Can you reproduce the problem using the emulator, or does this
> only happen on physical devices?
>
>

> On Jul 26, 2016, at 3:47 PM, Alexander Farber <al...@gmail.com>
> wrote:
> >
> >
> http://stackoverflow.com/questions/38590070/embedded-fonts-still-shown-in-ios-app-but-disappeared-in-android-app
>

unfortunately, my app does not run on AIR simulator,
because com.adobe.Vibration ANE does not run on it.

Regards
Alex

Re: Embedded fonts still shown in iOS app, but disappeared in Android app

Posted by Harbs <ha...@gmail.com>.
I think the first step is to confirm that it’s a Flex problem and not an AIR problem.

What happens if you compile the app using an older version of the Framework? Can you reproduce the problem using the emulator, or does this only happen on physical devices?

Harbs

On Jul 26, 2016, at 3:47 PM, Alexander Farber <al...@gmail.com> wrote:

> Good afternoon!
> 
> There is a card game written in Apache Flex, which I am trying to keep
> alive and while the iOS version still works ok, the Android app has
> developed several visual problems over the last 1-2 years:
> 
> 1. The card suit symbols are not displayed correctly (my main problem!)
> 2. The ActionBar text color is black
> 3. The BusyIndicator stopped rotating
> 
> Here is my entire CSS file:
> 
> @namespace s "library://ns.adobe.com/flex/spark";
> @namespace mx "library://ns.adobe.com/flex/mx";
> 
> s|ActionBar {
>    chromeColor: #0066CC;
>    color: #FFFFFF;   /* BUT WHY IS IT BLACK SOMETIMES? */
>    titleAlign: center;
>    textShadowColor: #000000;
>    fontFamily: embFont;
> }
> 
> @font-face {
>    src: url("/assets/fonts/arial.ttf");
>    fontFamily: embFont;
>    embedAsCFF: false; /* required for StyleableTextField */
>    unicodeRange:
>        U+0020-U+0040, /* Punctuation, Numbers */
>        U+2660-U+2666, /* Card suits - BUT THEY STOPPED WORKING */
>        U+0041-U+005A, /* Upper-Case A-Z */
>        U+0061-U+007A, /* Lower-Case a-z */
>        U+0410-U+0451; /* Cyrillic */
> }
> 
> s|LabelItemRenderer {
>    fontFamily: embFont;
> }
> 
> And here is an MXML code excerpt showing the callout with card suits and
> the "dead" busy indicator:
> <s:titleContent>
>    <s:Label id="_titleTxt"
>             fontWeight="bold"
>             color="#FFFFFF"
>             width="100%" />
> 
>    <s:BusyIndicator id="_busy"
>                     includeInLayout="false"
>                     visible="false" />
> </s:titleContent>
> 
> <s:actionContent>
>    <s:CalloutButton id="_leftBtn"
>                     icon="{VIP}"
>                     verticalPosition="after"
>                     includeInLayout="false"
>                     visible="false">
>        <s:VGroup
>            width="100%">
>            <s:Label id="_left0" fontSize="{Preferans.FONT_SIZE}" />
> 
>            <s:Label id="_left1" fontSize="{Preferans.FONT_SIZE}"
> color="#FF0000" />
>            <s:Label id="_left2" fontSize="{Preferans.FONT_SIZE}" />
> 
>            <s:Label id="_left3" fontSize="{Preferans.FONT_SIZE}"
> color="#FF0000" />
>        </s:VGroup>
>    </s:CalloutButton>
> ...
> </s:actionContent>
> 
> Adding the following CSS code does not help:
> 
> s|LabelItemRenderer {
>    fontFamily: embFont;
> }
> 
> Also I keep installing and recompiling my app in Flash Builder 4.7 with
> every new Apache Flex release and make sure, that I don't forget to install
> the optional flex-fontkit.jar but that does not help.
> 
> Finally here are the screenshot demonstrating my problem:
> 
> http://stackoverflow.com/questions/38590070/embedded-fonts-still-shown-in-ios-app-but-disappeared-in-android-app
> 
> Thank you for any hints
> Alex