Return-Path: X-Original-To: apmail-incubator-flex-users-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 27183DA58 for ; Fri, 16 Nov 2012 20:56:21 +0000 (UTC) Received: (qmail 98103 invoked by uid 500); 16 Nov 2012 20:56:20 -0000 Delivered-To: apmail-incubator-flex-users-archive@incubator.apache.org Received: (qmail 98063 invoked by uid 500); 16 Nov 2012 20:56:20 -0000 Mailing-List: contact flex-users-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-users@incubator.apache.org Delivered-To: mailing list flex-users@incubator.apache.org Received: (qmail 98053 invoked by uid 99); 16 Nov 2012 20:56:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 20:56:20 +0000 X-ASF-Spam-Status: No, hits=3.2 required=5.0 tests=FRT_ADOBE2,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.219.47] (HELO mail-oa0-f47.google.com) (209.85.219.47) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Nov 2012 20:56:15 +0000 Received: by mail-oa0-f47.google.com with SMTP id h1so3108309oag.6 for ; Fri, 16 Nov 2012 12:55:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:x-gm-message-state; bh=RXMAkrfYvWidxXKy6na+ixQo7vEe9JpXHZvN0MxmiVA=; b=mIjePX8jY7fyUyMTr69KqNF+0Dy5yGoqmDWIUmFo8B8hYbcvhhoYjZV42Y9vH7d3LE J3olXwja30b83nrYQzw8y+m3GAHWXY99MC3Xw2+BsXoacXSSto/rm8pid3kIjNelXu84 WCD3xg2P1gaRD7kRdLkRMwhCRVwWX3aYy7IG2/OLm0qqoSvw1qK14Eb0w9aV3htQo1dw +S/S39hY4/lKrhd3xg3k1gQtiAreMJMUstsboz8WBXkOUCEhA+tKV2dFWO3QffzwwKZ0 MkbtwLgThN4RxwBsvsV+w/gFOhRbRKLMh8D/Vaq5ame6cPm6A9K8SS48dQ9zXbJap3hf gsZA== MIME-Version: 1.0 Received: by 10.60.171.201 with SMTP id aw9mr4868713oec.126.1353099353859; Fri, 16 Nov 2012 12:55:53 -0800 (PST) Received: by 10.76.25.68 with HTTP; Fri, 16 Nov 2012 12:55:53 -0800 (PST) X-Originating-IP: [24.212.163.38] In-Reply-To: <001b01cdc42b$dd394c10$97abe430$@gmail.com> References: <001b01cdc42b$dd394c10$97abe430$@gmail.com> Date: Fri, 16 Nov 2012 15:55:53 -0500 Message-ID: Subject: Re: Embedded fonts, mixed FTE/Textfield components, and embedAsCFF From: Russell Warren To: flex-users@incubator.apache.org Content-Type: multipart/alternative; boundary=bcaec550a98855278b04cea2fe54 X-Gm-Message-State: ALoCoQnDfThOUlRfpb2KNU6crUpjBixM/PEANlc2p2ZzC36o4ugE+P5X4/cTnATZJr3fQhCWNinC X-Virus-Checked: Checked by ClamAV on apache.org --bcaec550a98855278b04cea2fe54 Content-Type: text/plain; charset=ISO-8859-1 For closure, I've got this working with the font loaded up twice (or at least portions of it). s|StyleableTextField does not work but it works fine with s|LabelItemRenderer. Thanks, guys! On a related note... how do you pass styles to an itemRenderer for a particular List (or whatever) instance? For example: LabelItemRenderer loads up styles for "paddingLeft", "paddingTop", "paddingRight", and "paddingBottom". I don't know how to set styles that will get picked up by the renderer instances? So far I've successfully set those styles by trying to set the defaults in my simple FastLabelRenderer subclass (http://static.inky.ws/syn/613). This works for all cases when I specify FastLabelRenderer, but it was only supposed to do default style values. When I try and override these values for a particular list (eg: to be even more condensed with less padding), I cannot get the "default" value to change. Setting 'paddingLeft="3"' doesn't work in the MXML for a List, presumably (and not surprisingly) because the List has no such style defined. I've tried direct use of .setStyle in the init handler for the List instance I want to tweak the renderers for, like so: private function myList_initializeHandler(event:FlexEvent):void { > var foo:List = List(event.target); > foo.setStyle("paddingLeft", 3); > foo.setStyle("paddingTop", 3); > foo.setStyle("paddingRight", 3); > foo.setStyle("paddingBottom", 3); > } but that does not work. Nor does it provide any warning or error. Each of the padding values end up being my supposed defaults of 8. What is the proper way to get styles down to the item renderers? Russ On Fri, Nov 16, 2012 at 1:54 PM, Mark Line wrote: > In a large application working on we load the same font twice to overcome > this problem, although we don't embed the full font only some characters. > > Seems to work quite well until we finish moving fully to tlf > > -----Original Message----- > From: Alex Harui [mailto:aharui@adobe.com] > Sent: 16 November 2012 18:45 > To: flex-users@incubator.apache.org > Subject: Re: Embedded fonts, mixed FTE/Textfield components, and embedAsCFF > > Yes, you can certainly embed the font twice, it just fattens the app, and > if > you have a full unicode font, that can be hefty. > > I think StyleableTextField is in the Spark namepace which typically has the > s| prefix. The LabelItemRenderer should be in Spark as well and setting > fontFamily there should work. > > > On 11/16/12 10:24 AM, "Russell Warren" wrote: > > >> > >> Unfortunately, that is a trade-off you will have to make. > > > > > > Do I really need to trade this off? Can I use brute force instead? > > For example... is there some way I can embed the same font twice, once > > as CFF for all the Spark skins, and once as non-CFF for anything based > > on TextField? > > > > Something like this: > > > > @font-face { > >> src:url("assets/fonts/Vera.ttf"); > >> fontFamily: Vera; > >> fontWeight: normal; > >> fontStyle: normal; > >> advancedAntiAliasing: true; > >> embedAsCFF: true; > >> } > >> @font-face { > >> src:url("assets/fonts/Vera.ttf"); > >> fontFamily: Vera*NoCFF*; > >> fontWeight: normal; > >> fontStyle: normal; > >> advancedAntiAliasing: true; > >> embedAsCFF: *false*; > >> } > > > > > > Is this possible to split between Spark/FTE and MX/TextField? I can't > > figure out a CSS selector path for identifying styles for > > StyleableTextField instances. I don't quite understand the CSS, though. > > For instance I have no idea how the snippet below fixes the font > > issues for the MX tooltips and Alert.show, but it works perfectly: > > > > /* Changing the global fontFamily above breaks mx components. The > >> mx|global bit below fixes this. > >> Source: > >> http://mikeorth.com/2012/embedded-fonts-with-tooltip-and-alert-in-fle > >> x-4 > >> */ > >> mx|global { > >> textFieldClass: ClassReference("mx.core.UIFTETextField"); > >> } > > > > > > If the brute force font double-up has the potential of working... how > > would I set the fontFamily for StyleableTextField to VeraCFF? I've > > tried this > > with: > > > > StyleableTextField { > >> fontFamily: VeraNoCFF; > >> } > > > > > > but the compiler complains that "Type 'StyleableTextField' in CSS > > selector 'StyleableTextField' must be qualified with a namespace." and > > I can't figure out what the namespace would be to get to > StyleableTextField. > > -- > Alex Harui > Flex SDK Team > Adobe Systems, Inc. > http://blogs.adobe.com/aharui > > -- Russell Warren Perspexis Technologies Inc. 613-882-1676 This information is confidential and intended solely for the use of the individual or entity to whom it is addressed. If you have received this email in error, please notify the sender immediately. --bcaec550a98855278b04cea2fe54--