Results 1 to 3 of 3

Thread: How to correct the Font theming in Architect3

  1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Auckland
    Posts
    45
    Answers
    1

    Default Answered: How to correct the Font theming in Architect3

    I'm using Architect 3 to build a mobile app, and then I add a "Scss resource" from my customized theme, and add the new Font support, font files located in:

    "ProjectName/resource/fonts"

    In Architect3 like this:
    ( only pay attention to "Add UBuntu font support" )
    Screen Shot 2014-02-05 at ??9.05.31.jpg

    But after Architect 3 reCompile the scss( output file is automatic to: "ProjectName/theme/sencha-touch-75b4c4d2-2e22-47ac-9dd8-dde401ba6648.css" ), the font path MUST start with the "/stylesheets/fonts", no matter what "font-files" you input( into the font-face function ), it always add this prefix path, like this:

    @font-face{font-family:"UBuntuMedium";src:url('/stylesheets/fonts/ubuntu_medium.ttf') format('truetype')}

    if you input :
    @include font-face( "UBuntuBold", font-files( "../resource/font/ubuntu_bold.ttf" ) );

    it will generate like this:

    @font-face{font-family:"UBuntuMedium";src:url('/stylesheets/fonts/../resource/font/ubuntu_medium.ttf') format('truetype')}

    Who can help me to figure out what happen?

  2. Might be a compass config issue, however that is typically provided by the framework. A simple workaround is to just avoid using the font-files helper function, and type out the @font-face rule.

    Once that is working, you'll likely run into an issue regarding relative paths, as the base paths are inconsistent between the architect canvas/preview and build versions. We're working on a fix for this to make relative paths better supported. To work around this, you might have to place the relative assets in two places.

  3. #2
    Sencha User arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    498
    Answers
    10

    Default

    Might be a compass config issue, however that is typically provided by the framework. A simple workaround is to just avoid using the font-files helper function, and type out the @font-face rule.

    Once that is working, you'll likely run into an issue regarding relative paths, as the base paths are inconsistent between the architect canvas/preview and build versions. We're working on a fix for this to make relative paths better supported. To work around this, you might have to place the relative assets in two places.

  4. #3
    Sencha User
    Join Date
    May 2011
    Location
    Auckland
    Posts
    45
    Answers
    1

    Default Thanks and please keep up the good work:)

    Quote Originally Posted by arnebech View Post
    Might be a compass config issue, however that is typically provided by the framework. A simple workaround is to just avoid using the font-files helper function, and type out the @font-face rule.

    Once that is working, you'll likely run into an issue regarding relative paths, as the base paths are inconsistent between the architect canvas/preview and build versions. We're working on a fix for this to make relative paths better supported. To work around this, you might have to place the relative assets in two places.

    Thanks, I will try to type out the @font-face function, and keep waiting your new version release, because If we choose to use Architect 3( Like a very powerful IDE ), we won't hope that I still need to work with another command line( or other third-party tools ), we hope we only use Architect can finish all thing and "Simply", or We Don't Need Architect 3( Before that we can do Sencha App very fast typing by Eclipse or Sublime ....), make sense?

    But anyway, Good Job For Architect, We Like It Very Much, keep up the good work!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •