<%@language = "javascript" %>
<% /*
     $Revision$
     $Id$

     File:          cad_verify_font.asp
     Description:   vanuit fac-verify om te controleren of "Font Awesome 6 Pro Regular"
                    op de webserver staat
     Parameters:

*/
DOCTYPE_Disable = 1;
%>

<!-- #include file="../Shared/common.inc" -->
<%
    var dwfFile = Server.MapPath("../shared/werkplek.dwf");

    var tempW2D = shared.tempFolder() + "/CAD_" + shared.random(16) + ".w2d";

    var xc = new ActiveXObject("SLNKDWF.DWFFile")
    xc.Open(dwfFile)

    var y = new ActiveXObject("SLNKDWF.WhipFile")
    y.SetLayers("CONT*", "CONT*")
    y.LoadStream(xc.EplotSections.Item(0))

    y.SetSymbolFont(S("fg_symbolfont"), 1000)

    symb = y.AddSymbol(600, 500, "@0000e002"); // Koffiekan
    symb.scale = 0.4;
    symb.rotation = -45;
    symb.SetColor(0x00FF00, 255);

    symb = y.AddSymbol(900, 200, "@0000f0f4"); // Koffiekopje
    symb.scale = 0.25;
    symb.SetColor(0xFF0000, 255);
    y.SaveAs(tempW2D, true);

    xc = new ActiveXObject("SLNKDWF.Whip2PNG");
    xc.Load(tempW2D);
    xc.SetDimensions(120, 80, 6, 4, .9);
    Response.contenttype = "image/png";
    Response.BinaryWrite(xc.GetAsPNG());

    var fso = Server.CreateObject("Scripting.FileSystemObject");
    fso.DeleteFile(tempW2D);
    Response.End();

%>