New Fonts

9 posts, 0 answers
  1. elaheh
    elaheh avatar
    7 posts
    Member since:
    Oct 2010

    Posted 03 Mar 2012 Link to this post

    Hello,
    How can I add new fonts to "Add Text" in ImageEditor?
    (I have added the new fonts by customizing Add Text dialog, but it doesn't apply on the text) 
    Thank you
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 05 Mar 2012 Link to this post

    Hello,

    I tested the customized Add Text dialog in the Customize Built-in Dialogs live demo and I was unable to reproduce the reported problem. Could you please see my test in the following video http://screencast.com/t/xdghYax3CiFa and let me know what I am missing?

    Kind regards,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. elaheh
    elaheh avatar
    7 posts
    Member since:
    Oct 2010

    Posted 06 Mar 2012 Link to this post

    Hello,
    Thanks for your reply.
    I have used this code in AddText.ascx:
     <telerik:RadComboBoxItem Text="Courier New" Value="courier new" />
            <
    telerik:RadComboBoxItem Text="Georgia" Value="georgia" />
            <
    telerik:RadComboBoxItem Text="Ms Sans Serif" Value="ms sans serif" />
    Is this enough for applying the fonts on text?
    when I choose one of this fonts and write some text, the font is applied on the shown text. But when I click Insert, my text doesn't have the specified font which had been shown before inserting.
    This problem occurs only when I publish my page over the internet, and it doesn't have any problem in localhost.
  5. elaheh
    elaheh avatar
    7 posts
    Member since:
    Oct 2010

    Posted 06 Mar 2012 Link to this post

    Sorry, it seems that the problem is just related to some fonts like this.
    Is there any solution for it?
  6. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 08 Mar 2012 Link to this post

    Hello,

    Note that the linked fonts are custom and they cannot be used on your page out-of-the-box. You should ensure that they are installed on your server or that they are added to the fonts, used by your browser. After this is done, you will be able to utilize the specified fonts on the page, including in the Add Text dialog of RadImageEditor.

    Kind regards,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. elaheh
    elaheh avatar
    7 posts
    Member since:
    Oct 2010

    Posted 09 Apr 2012 Link to this post

    Hello,
    Thanks for your reply.
    I requested for installing my fonts on server, but they told me that it is not possible to install the fonts on server.
    Is there another solution for useing those fonts? May I upload the fonts and call them in AddText dialog?
  8. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 09 Apr 2012 Link to this post

    Hello Elaheh,

    The custom fonts should be installed on the machine that runs your application. Only the fonts that are available on the sever can be used for modifying the text in the edited image. This is a requirement of the .NET Framework and it cannot be circumvented.

    Greetings,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  9. elaheh
    elaheh avatar
    7 posts
    Member since:
    Oct 2010

    Posted 15 Apr 2012 Link to this post

    Hello,
    I found that there is a way to use fonts which are uploaded on server, in ASP.NET:
    PrivateFontCollection pr = new PrivateFontCollection();
           pr.AddFontFile(Server.MapPath("BNazanin.ttf"));
           Font font = new Font(pr.Families[0], 16.0f, FontStyle.Bold, GraphicsUnit.Point);
    Isn't there any solution like this, for adding fonts in telerik image editor?
    Thanks
  10. Niko
    Admin
    Niko avatar
    387 posts

    Posted 18 Apr 2012 Link to this post

    Hello,

    This approach of loading custom fonts in the .NET environment is possible. However the drawback is that once loaded they should be used in the same context. Therefore you need to load them when the image is being edited. As currently there is no way to extend the graphics core of the ImageEditor without modifying the control itself, another solution should be found.

    This could be a custom handling of the OnImageEditing event, where you should cancel the default execution of the event when the CommandName is AddText and do the manipulations on the image using custom code. Here is an example from our help pages - http://www.telerik.com/help/aspnet-ajax/radimageeditor-custom-server-side-operations.html

    Hope this helps.


    All the best,
    Niko
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017