Giter Club home page Giter Club logo

epi.fontthumbnail's People

Contributors

degborta avatar dependabot[bot] avatar frederikvig avatar imgbotapp avatar johanbenschop avatar marisks avatar patkleef avatar yungis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

epi.fontthumbnail's Issues

Add new access role to ThumbnailIconController

We have an issue with the roles set on the controller, because some of our editors has limited access and none of the goups applied to day.

It would be nice to have an extra group like ThumbnailGroup, that you can use to set access rights with.
[Authorize(Roles = "Administrators, CmsAdmins, CmsEditors, WebAdmins, WebEditors, ThumbnailGroup")]

Seems FontThumbnailService isn't fully working on Azure AppService

Same code works differently locally and in cloud (Azure AppService). Some thumbs won't load in Azure, everyone works locally. Same ttf-file locally and on Azure.

Used like this, won't work on Azure:

[ThumbnailIcon("fa-light-300.ttf", 0xf015)]

Used like this, works on Azure:

[ThumbnailIcon("fa-light-300.ttf", 0xf1ea)]

Error:

Parameter is not valid. at System.Drawing.Bitmap..ctor(String filename)

image

Seems like some icons works to generate thumbnails from, and some won't.

image
Some files seems to be zero sized too.


It seems like new Bitmap(path) won't work reliably in Cloud see here and here since .

Error exists in FontThumbnailService.cs.

Proposed fix might be changing this, if new Bitmap works best with stream instead of path:

if (File.Exists(cachePath))
{
    using (var bmpTemp = new Bitmap(cachePath))
    {
       return new Bitmap(bmpTemp);
    }
}

to this (dummy-coded):

if (File.Exists(cachePath))
{
    using (StreamReader sr = new StreamReader(cachePath)) 
    {
        using (var bmpTemp = new Bitmap(sr))
        {
            return new Bitmap(bmpTemp);
        }
    }
}

CustomFont for ThumbnailIcon doesn't reflects to TreeIcon

Using CustomFont on ThumbnailIcon and adding <add key="FontThumbnail.EnableTreeIcons" value="true"/> in web.config doesn't generate any tree icon.

I have the FontAwesome PRO-set and are using it like this:
[ThumbnailIcon("fa-light-300.ttf", 0xf022)] for the list-alt icon in FAL.

Configured like this:

    <add key="FontThumbnail.BackgroundColor" value="#0b496e" />
    <add key="FontThumbnail.ForegroundColor" value="#ffffff" />
    <add key="FontThumbnail.FontSize" value="40" />
    <add key="FontThumbnail.CustomFontPath" value="Assets\vendors\" />
    <add key="FontThumbnail.EnableTreeIcons" value="true"/>

Of course I can use two attributes to get it to work with the wrong font.

    [ThumbnailIcon("fa-light-300.ttf", 0xf022)]
    [TreeIcon(FontAwesome5Regular.ListAlt)]

But it would be nice if it was possible to do something like adding a third parameter for Page Tree Icon-fallback:

[ThumbnailIcon("fa-light-300.ttf", 0xf022, "fal fa-list-alt")]

Or supporting adding class as free text in TreeIcon

[TreeIcon("fal fa-list-alt")]

The free text "thingy" would make completely different icon fonts (not only adding support of FontAwesome PRO) usable in page tree too, as you already solved for thumbnail icons in ThumbnailIcon-attribute by having ttf-reference and charcode-support... ๐Ÿ‘

Some FA icons missing

I've noticed that some icons are missing. For example:

  • newspaper-o
  • question
  • question-circle
  • question-circle-o
  • sticky-note
  • sticky-note-o

I haven't had time to make a proper diff with the official list of icons but more are probably missing.

Thanks for a great plugin!

fontawesome-webfont.ttf file gets locked by system process on Windows 2016

Hi,

We are using Epi.FontThumbnail on a EPiServer site (version 10.4.2) and sometimes when we build via TeamCity to a Windows 2016 server we get an error saying the font file fontawesome-webfont.ttf is locked by the SYSTEM process. We then have to do an iisreset and delete the font to get it to build again. This only happens rarely (three times so far in about a months time).

I have found the following Stack Overflow thread, but it does not give a solution to the issue:

http://stackoverflow.com/questions/27677285/font-file-is-being-held-by-system-process

Is it possible to embed the font file in the assembly or similar to avoid this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.