Include files can be done on flexmojos as well...
http://sites.sonatype.org/flexmojos/flexmojos-maven-plugin/compile-swc-mojo.html#includeFiles

<http://sites.sonatype.org/flexmojos/flexmojos-maven-plugin/compile-swc-mojo.html#includeFiles>If
you just put your files into src/main/resources it will include.


VELO

On Thu, Aug 20, 2009 at 4:53 PM, Kelly Davis <[email protected]> wrote:

>
> I made some progress on getting this to what I want. compc won't allow
> you to compile fonts, but in flex builder, I have always been able to
> put a stylesheet and some fonts to be embedded inside a library which
> can then be used by other apps. It only works for me when the font and
> stylesheet are the top-level of the library source tree. I reasoned
> that it must just be including the fonts and the css file directly in
> the swc, not actually doing any compilation / processing until you
> build a swf that references the library. So, in the pom for my swc
> library, I just use <includeFiles> for all of the fonts and the css.
> The stylesheet directly references the font file:
>
> @font-face {
>    src: url("arial.ttf");
>    fontFamily: arial;
> }
>
> Running compile-swc will just package these up into the swc, and then
> you can reference the stylesheet and font in any project that depends
> on the swc.
>
> On Aug 18, 2:43 pm, develar <[email protected]> wrote:
> > must be in root due to compiler bug -
> http://bugs.adobe.com/jira/browse/SDK-14908
> >
> > @font-face
> > {
> >         src: url("segoeui.ttf");
> >         fontFamily: SegoeUI;
> >         embedAsCFF: true;
> >         unicodeRange: applicationRange;
> >
> > }
> >
> > my default css in root (i. e. in src/main/resources)
> >
> > On Aug 17, 10:29 pm, Kelly Davis <[email protected]> wrote:
> >
> >
> >
> > > Here is a compc example:
> >
> > > compc -include-stylesheet styles.css src/main/flex/styles.css -include-
> > > sources src/main/flex/Test.mxml -output=test.swf
> >
> > > The stylesheet is like this:
> >
> > > @font-face {
> > >   src: url("src/main/resources/arial.ttf");  fontFamily: MyriadPro;
> >
> > > }
> >
> > > Unfortunately, I get the following result:
> >
> > > 'Error: unable to export SWC test.swf: java.lang.NullPointerException'
> >
> > > I found this in the Adobe Bug Database, so it may just be a problem
> > > with compc:http://bugs.adobe.com/jira/browse/SDK-22471
> >
> > > On Aug 17, 11:50 am, Marvin Froeder <[email protected]> wrote:
> >
> > > > If you could provide me a COMPC/MXMLC example I can do some extra
> > > > investigation.
> > > > VELO
> >
> > > > On Mon, Aug 17, 2009 at 12:40 PM, Kelly Davis <[email protected]>
> wrote:
> >
> > > > > Ok, with the fonts configuration removed I still get the same
> error.
> > > > > Can you post your working configuration details?
> >
> > > > > On Mon, Aug 17, 2009 at 11:35 AM, David Rom<[email protected]>
> wrote:
> > > > > > I've got one similar setup that's working without problems and
> the only
> > > > > > thing I see right away that's different is that it doesn't
> include any
> > > > > fonts
> > > > > > configuration at all.  Just to verify, try commenting out the
> entire
> > > > > > <font>...</font> section of from the plugin configuration and see
> what
> > > > > > happens.  If that at least compiles, it probably means something
> is
> > > > > either
> > > > > > wrong w/ the configuration or there's a bug in the 3.2 handling
> of it.  I
> > > > > > verified the local project here on 3.2.0 and 3.3-SNAPSHOT to show
> that
> > > > > both
> > > > > > worked and it did, but 3.3-SNAPSHOT is definitely handling
> default font
> > > > > > config differently judging from the compiler output.
> >
> > > > > > --David
> >
> > > > > > On Mon, Aug 17, 2009 at 11:14 AM, Kelly Davis <
> [email protected]>
> > > > > wrote:
> >
> > > > > >> I just tried it and got the same result.
> >
> > > > > >> On Mon, Aug 17, 2009 at 11:00 AM, Marvin Froeder<
> [email protected]>
> > > > > wrote:
> > > > > >> >> Here is the stylesheets (styles.css):
> >
> > > > > >> >> @font-face {
> > > > > >> >>    src: url("../resources/arial.ttf");
> > > > > >> >>    fontFamily: arial;
> > > > > >> >> }
> >
> > > > > >> >> I have tried a number of variations of the url for the font
> with the
> > > > > >> >> same results. The only thing that does work is if I embed a
> local
> > > > > font
> > > > > >> >> instead of referring directly to the font file.
> >
> > > > > >> > Did you try to put your fonts on src/main/resources and usr
> url like
> > > > > >> > "/myfont.ttf" ?
> >
> > > > > >> > VELO
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos?hl=en?hl=en

http://blog.flex-mojos.info/
-~----------~----~----~----~------~----~------~--~---

Reply via email to