Forum Discussion

BowBharath's avatar
8 years ago

Font asset url encode ?

We bought new font from some vendor. We uploaded into asset library. We use this ur html/asset/fontname.ttf . It’s easily downloaded from browser. Now we concern to encode this url and use in fontfamily css. Does lithium provide any script. ? Or any way to encode? Please help me?

7 Replies

  • BowBharath's avatar
    BowBharath
    Ace
    8 years ago
    2nd link access denied. Can u post screenshots of that page. Appreciate your help
  • AbhishekIlindra's avatar
    AbhishekIlindra
    Boss
    8 years ago

    BowBharath : Kindly mail to communityhelp@lithium.com and they will provide you access quickly

     

    If my post is helpful and answers your question, please give "Kudos" and "Accept it as a Solution."

    Thanks & Regards,
    Abhishek Illindra

  • VikasB's avatar
    VikasB
    Boss
    8 years ago

    BowBharath  You need to use like below in your community skin or CSS file.  You can add your additional styles to the family as I mentioned in below code(optional).

     

    @font-face {
      font-family: 'familyName';
      src: url('/html/assets/fontName.ttf') format('embedded-opentype');
      font-weight: normal;
      font-style: normal;
      font-stretch: condensed;
    }

    body {
    font-family: familyName;
    }

     

  • Vikash I am think to encode that url which is not easily read or accessible to anyone .  Since we bought that font and want to add some security

  • VikasB's avatar
    VikasB
    Boss
    8 years ago

    BowBharath  That reply was about how to include those fonts. 

    It might be helpful for you. 

    <#assign myurl = "/html/assets/fontName.ttf" />
    ${myurl?url}
    
    Output:  %2Fhtml%2Fassets%2Fabc.ttf
  • TariqHussain's avatar
    TariqHussain
    Boss
    8 years ago

    BowBharath- All files stored in lithium assets are accessible, Anyone can access the font file by viewing source code of community. You can not add extra security on that. Either you can reach lithium support or store your font file at CDN which can provide this type of security.