Flex :: Embedded Fonts Not Being Applied Correctly In Label And DataGrid?

Mar 22, 2010

I am observing a problem with how an embedded font is applied to certain Flex components, namely mx:Label and mx:DataGrid. I have a CSS that declares three variations on an embedded font as follows:

@font-face
{
src:url("buttons.swf");

[Code].....

(I've snipped some stuff from both style rules, so if you think there's something that may be causing a conflict I can certainly post the entire definition. It's mostly color, line and padding stuff for the DataGrid.)

The problem that is for both Label and cells in the DataGrid the text is being rendered as sort of a times new roman font. The headers in the DataGrid are fine, just the text in the cells is wonky. All other components use the correct font as defined in the CSS/SWF.

View 1 Replies


Similar Posts:


Actionscript 3 :: Fonts Embedded With StyleManager In Flex App Be Applied To Components?

Oct 4, 2011

I'm testing some font embedding in Flex 4. Using the tutorial below (modified a bit), I'm loading in fonts via compiling CSS into SWFs. [URL] When I apply those styles to my Flex components all is well, however, I need to add an AS3 component to my Flex app. This component has some Flash text fields in it. The only way I know to embed fonts in AS3 is completely different and I believe requires another load. What I want to know is if there is any way that the text fields in my AS3 component can use the same styles and embedded fonts that the Flex components are using.

View 1 Replies

ActionScript 3.0 :: Embedded Fonts Not Displaying Correctly

Nov 14, 2009

I've attached 2 screenshots.  The first shows the flash stage at its default size - as you can see my font is all distorted and weird looking but when you zoom in (image 2) it's exactly like it should be.  What would make it look like this when the stage hasn't been zoomed out or anything, it's just from pressing cmd and enter from flash?
 
I embedded it by putting it into the fla's library.

View 3 Replies

Flex :: DataGrid Prevent A Filter From Being Applied Automatically?

Jan 4, 2011

To situate things I am working on a translation utility with a datagrid having 3 columns : translation code, reference text and target text.

The DataGrid's dataProvider property is bound to an ArrayCollection instance. The user can edit the grid and on a successful edit, the underlying collection is updated using the setItemAt() method. The collection also has a filter function to make it easier to find certain texts.

When the user clicks the 'apply filter' button the filter function is updated. This works well. The problem I have is that rows are hidden as soon as the underlying collection item change in a way that doesn't comply with the filter. The row is hidden immediately, which is not very user friendly. Rows should only hide (or be shown) when the 'apply filter' button is pressed.

View 2 Replies

Flex :: Mx:Datagrid Not Displaying Booleans Correctly

Jul 8, 2011

I am experiencing some rather quirky behaviour with datagrid itemRenderers. First, I create an ArrayCollection as follows:

[Bindable]
private var myBooleans:ArrayCollection = new ArrayCollection([false,true]);

And afterwards I bind it to a datagrid:

<mx:DataGrid dataProvider="{myBooleans}" width="100%" height="100%">
<mx:columns>
<mx:DataGridColumn
xmlns:mx="library://ns.adobe.com/flex/mx"

[Code].....

When running this, the datagrid only shows a row with the correct itemRenderer if the boolean == true. For the row where the boolean == false, it will display an empty row.

I would also like to add that wrapping the boolean in a wrapper object will not cut it for my use case since I will receive an ArrayCollection of unwrapped booleans through an RPC call.

View 1 Replies

Flex :: Spark Datagrid With Checkbox Does Not Update Correctly?

May 26, 2011

The checkboxes are updated correctly when I select one or more datagrid rows but when I select a checkbox for the first time the checkbox does not refresh until the pointer moves out of the datagrid row. How can I fix this?

[Code]...

View 3 Replies

Flex :: Loading Embedded Fonts From Modules?

Nov 28, 2009

As some of these languages have very big font sizes (e.g. Chinese), I do not want to load all these fonts into the app. at once but was thinking to put them into different modules and then load only the specific module (depending on which language is chosen in the main app). For this I moved the style part from the main app:

<mx:Style>
@font-face
{
font-family:DedicatedFont;

[Code]....

into the different modules. Above one is e.g. for the Chinese font (cma.ttf).

The modules are created and I can also use the fontstyle (DedicatedFont) in the module itself, but I can not access it from my main application.

View 1 Replies

Flex :: Embedded Fonts On Input Field?

Mar 13, 2011

I'm trying to embed a font using css on in my flex project via CSS:

@font-face {
src: url("/slimCurves.ttf");
fontFamily: SlimCurves;

[Code]....

When I try to apply the style to a text input field the input field looses its existing style, but doesn't seem to inherit the custom one.

<s:TextInput width="100%" fontSize="33" text="test" styleName="slimCurves"/>

If I apply the same style to a label, the label shows the text in the custom font as would be expected.

View 2 Replies

Flex :: Difference Between Embedded And System Fonts?

Jun 30, 2011

I need to use multiple fonts in my Flex 4 application, so I compile them into swf and load at runtime. I have single .ttf file for each font. When I dont load font's swf file at runtime, flex uses copy of this font installed on my system, and it works fine - I can switch between regular, bold and italic faces of the font correctly.However,when I load fonts from swfs, setting their style to bold or italic makes no effect. I tried different ways of compiling swfs (css using mxmlc compiler, fontswf utility,.as files with [embed] tags), but nothing worked. When compiling using css it sometimes throw errors that font face is not supported, and it seems that some fonts are available only in bold-italic style only or bold style only.I use cff fonts, load them using etcs.ru.utils.FontLoader utility. Fonts are loaded correctly, I check this with Font.enumerate fonts.So is there any way to embed these .ttf files with all styles available?

View 1 Replies

Flash :: Runtime Fonts Not Playing Nice With Fonts Embedded In Static Text?

Jul 11, 2010

I save my (embedded) fonts in an external file (fonts.swf) that gets loaded at runtime. Pretty standard. I also use a bunch of UI artwork generated in the Flash IDE. Some of this artwork contains static textfields (thus, not proper TextFields that can change. Just frozen glyphs). Here's the problem: if I use the same font in any static textfield and then embed that same font into my collection of runtime fonts, the runtime font will refuse to render. It's the same effect you get if you set a textfield with embeddedFonts=true to use a font that isn't embedded. If I change the static textfields to use a different font, the runtime fonts work just fine.

[Code]...

View 2 Replies

Flash Detect Missing Embedded Fonts And/or Replace With Available Fonts?

Dec 22, 2010

Edited Short Version:The Adobe Flash docs list a property embedFonts on TextAreas:

A Boolean value that indicates whether the font specified in fontFamily is an embedded font. This style must be set to true if fontFamily refers to an embedded font. Otherwise, the embedded font is not used. If this style is set to true and fontFamily does not refer to an embedded font, no text is displayed. The default value is false. Regarding the "If this style is set to true and fontFamily does not refer to an embedded font, no text is displayed" statement: How can I detect in ActionScript when this scenario happens?

TL;DR Original Version: I have a flash application which loads external .swf files containing embedded fonts, so that these fonts can be used within the main application. We're accomplishing this by using the following ActionScript code on anything which uses custom fonts:

[Code]...

View 1 Replies

Flash 10 :: [CS5] : Embedding Fonts With An Applied Style?

Sep 24, 2010

I'm clear on the new CS5 IDE dialogue for embedding fonts, for example, embedding Arial, no problem, BUT, I want to embed Arial Bold (should be easy, right?), so I:

1. From the dynamic textfield's property panel, select Arial for the family, and Bold for the style.

2. Click embed, the dialogue appears, set up with the Arial-Family and Bold-Style as an entry on the list of embedded fonts.

3. I set a range of characters to be embedded with the font.

4. Click OK.

(Note: We're not assigning this font via actionscript to the textfield, the dynamic textfield is an asset on the stage, etc, so I'm assuming then I shouldn't have to export the font for actionscript)But clearly it's NOT OK, the bold font doesn't render, and I just see the regular Arial font... How can I get an embedded font STYLE to render correctly?

View 2 Replies

Flex :: Spark TextArea Not Displaying Embedded Fonts?

Feb 6, 2012

I can't seem to get TextArea to render any embedded fonts in project. I've searched online and have found a couple of instances of this issue but no solutions.

I have a few fonts embedded with my app. Spark Label & the mx:TextArea (switching embedAsCFF to 'false') will display them correctly so I know they're embedded OK. I have the fontFamily value in a binding but I even tried just instantiating a new TextArea then assigning one the the embedded fonts via the fontFamily style and have had no luck.

/* In my CSS file */
@font-face {
src:url("assets/fonts/UbuntuMono/UbuntuMono-Regular.ttf");
fontFamily: UbuntuMono;

[Code].....

View 1 Replies

Flex :: Detect Unsupported Glyphs (non-embedded Fonts)?

Feb 29, 2012

My app does the following:enumerate fonts installed on the clients machine, and populate a dropdown list with them present a s:TextArea with special characters (like Àâü)update the TextArea's font family to the one selected in the dropdown After it updates, there seems to be three possible results: the correct glyph, a blank space, or a fallback glyph in a device font (seems to be _serif, though the CSS style is _typewriter). My goal is to programmatically detect whether a device font supports all the glyphs in a chosen user font.

I have tried getBounds on various children (to detect 0 width, etc.), getting info about atoms, and comparing fontFamily for a correct glyph against fontFamily for a blank or fallback glyph. For formatting changes that dispatch a UpdateCompleteEvent or CompositionCompleteEvent, i am always doing my checks after it completes.

View 1 Replies

ActionScript 3.0 :: Flex Compiler - Embedded Fonts Not Working

Jun 5, 2010

I cannot get embed fonts working Everywhere I look it says to do it like I am doing it below, but it doesn't work. I am using FlashDevlop with Flex compiler. There are no error messages. I have tried taking everything out of the Embed directive and adding it in one by one, but no affect.
When I use the system font, it works.
When I use the embedded fonts without setting embedFonts to true, I get TimesRoman.
When I use embedded font with embedFonts to true, I get nothing.

ActionScript Code:
package fontManager{
import flash.text.TextField;
import flash.text.TextFormat;
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite
[Code] .....

View 5 Replies

Flex :: DataGrid Edits Label Instead Of Data

Jan 20, 2010

I have an editable DataGrid in Flex, with data full of numbers. The columns have no special itemRenderer, but a labelFunction, which returns the number as-is if positive, but puts it in parentheses if it is negative, like so

27.3 => "27.3"
-27.3 => "(27.3)"

Now, these cells are editable. When I try to edit a cell with a positive number, nothing is wrong. But if I try to edit a negative number, it starts editing (27.3) instead of editing -27.3. Because of this, when the edit is done, the labelFunction is evaluated with the new value in parentheses(i.e.,labelFunction is called with "(30.5)"), and converting it to a Number results in NaN. So, I want to know if I can make the DataGrid edit the data in the dataProvider instead of the label that it shows.

View 1 Replies

Flex :: Get Linkbutton Label Name And Selected Row Of Datagrid?

May 12, 2011

i am using below code for using linkbutton in flex datagrid

<mx:DataGridColumn headerText="Case ID" width="80">
<mx:itemRenderer>
<fx:Component>

[Code]...

now on link button click i want linkbutton label name and selected row inside lnkCaseIdClick method, how can i do this?

View 2 Replies

Flex :: Get Data From Datagrid In A View To A Label?

Oct 26, 2011

<mx:DataGrid id="dgAutoFill" x="11" y="234" width="934" dataProvider="{rssHln.lastResult.rss.channel.item}">
<mx:columns>

[Code]....

I'm trying to get the title from the selecteditem from this datagrid (which is filled by a rss-feed) in a label. I've searched for ways, but I can't find how I should get this done.

This is the eventhandler I've added to the datagrid, and the function:

dgAutoFill.addEventListener(ListEvent.ITEM_CLICK, showDetails);
public function showDetails(event:ListEvent):void {
lblTitle.text = ?;
}

View 1 Replies

Css :: Flex 4 Rotated Horizontal Label With Embedded Font Truncated?

Feb 14, 2011

I am trying to get the horizontal label of a ColumnChart rotated by 45°. I already know the font needs to be embedded for this to work, but now, my label are being truncated. Note that it worked in a basic chart proof-of-concept I made months ago, but now it is integrated in a panel with a verticalLayout, label are truncated.

[Code]...

Note that if I use the style for the vertical axis, I also get the number truncated to the first digit.

View 1 Replies

Flex :: Datagrid Different Fonts For Column Header And The Text In The Corresponding Cell?

Aug 4, 2009

For a flex datagrid : How do I have different fonts for a column header and the text in the corresponding cells?

View 1 Replies

Flex :: Default Sort In Datagrid With ItemRender Label?

Aug 14, 2010

We know already Datagrid defult sorting , when we click on header of dategrid then automatically sorting records well . But how can we sort within inline itemreander linkfield label in datagrid . In project defult sorting properly work in datagrid but linked field column only not sorting ? Is it any way to sort functionality?

View 1 Replies

Flex :: Flash - Sorting A Datagrid Column By The Row's Label

Aug 18, 2010

I'm creating a table that displays information from a MySQL database, I'm using foreignkeys all over the place to cross-reference data.

Basically I have a datagrid with a column named 'system.' The system is an int that represents the id of an object in another table. I've used lableFunction to cross-reference the two and rename the column. But now sorting doesn't work, I understand that you have to create a custom sorting function. I have tried cross-referencing the two tables again, but that takes ~30sec to sort 1200 rows. Now I'm just clueless as to what I should try next.

Is there any way to access the columns field label inside the sort function?

public function order(a:Object,b:Object):int
{
var v1:String = a.sys;

[Code]....

View 2 Replies

Flex :: Using TruncateToFit For A Label Inside A Column Of DataGrid?

Feb 5, 2011

I am having this problem using the dataGrid in flex. I have a Label in one of the columns of the datagrid, and the label has the truncateToFit property True. But it is not working.

At first I had a static width to Label, and it works in that case. But the problem using that is, when I change the wide of the column, in the output, it does not changes the width of label, and if I make the column width small, the label wont get truncated.

Using 100% width for the label, does not helps either.

My datagrid code looks like below given code:

<mx:AdvancedDataGrid id="user_files_list" width="100%" height="100%"
top="0" left="0" dragEnabled="true" dragMoveEnabled="true"
dataProvider="{fm_model.user_files_list}"

[Code].....

View 3 Replies

IDE :: Pixel Fonts Are Not Displaying Correctly

Feb 11, 2009

I recently started using FF_Hero on a project but I noticed that the bottom 3 pixels are not displaying effecting g,y,q. It has nothing to do with the text box size. Non pixel fonts work fine...is there a work around?

View 3 Replies

Professional :: Label Text Wont Change Correctly?

Nov 4, 2011

I usually program with C#, PHP, html etc.trying to learn Adobe Flash now so i downloaded the trial version which has 30 days trial.tried to create and follow the tutor for click ball which all of the code is the same but it doesnt work.

I triple check the code and its all right but it still not working.so i commented out all of the code and has a simple code of changing the text of the label.i set the text to "abcdefg" and but it only show "cdef".i expanded the width of the label so width is not the issue. trying to search for the limitation of the trial but i dont see any.trying to test this before i buy it.it does change but not changing correctly.i try to set to another value it always show partially only.

View 3 Replies

IDE :: Fonts Won't Be Embedded

Jun 21, 2009

I can't figure out why my fonts won't be embeded.

[CODE]...

View 1 Replies

ActionScript 3.0 :: Embedded Font Not Display Correctly In Swf?

Nov 14, 2009

ve attached 2 screenshots. The first shows the flash stage at its default size - as you can see my font is all distorted and weird looking but when you zoom in (image 2) it's exactly like it should be. What would make it look like this when the stage hasn't been zoomed out or anything, it's just from pressing cmd and enter from flash?I embedded it by putting it into the fla's library.

View 2 Replies

Use Two Embedded Fonts On One String?

Aug 4, 2009

I am dynamically loading rss description into it and would like to have first character and characters unsupported by other font be in that first font. i limited the range of char of that second font so all unsupported chars and first char should be in that first font.

View 2 Replies

Flash - Embedded Fonts Won't Appear

Nov 20, 2011

I'm trying to embed a font in FlashDevelop. My folder structure is My embed metadata is

[Embed(source = 'resources/04B08.TTF', fontName = '04b08')] public var _04b08:Class;

My code is

public var titleFormat:TextFormat;
public var titleText:TextField;
private function init(e:Event = null):void

[code]....

If I use this, I get

But I uncomment the titleText.embedFonts = true; line, I get This is the method that all of the guides I can find use. What should I do to get it to work?

View 1 Replies

Fonts Automatically Embedded Like A PDF?

Dec 28, 2007

When you use funky/weird fonts in a fla are they embedded automatically like a PDF file? So if the viewer doesn't have that font they can still see it?

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved