Protect TTF Font files by making them unopenable, but still work on as webfonts - file

I'm a font maker and I want to protect my web-fonts.
I know about the HTACCESS way to protect font files, but I found that there is another way to protect web-fonts: making the TTF font files intentionaly corrupted when you try to open them with Windows Font Viewer so they won't be installable, while the the same exact file will still work as webfont in the browser.
Here's a working example I have found (how they did it is the mystery):
http://fontface.co.il/fonts/demo_s.asp?id=131
As you can see, you are able to access the font files if they are cached in your browser, but when you download the TTF file and open it via "Windows Font Viewer" in order to install it, it will give you this error: "The requested file _____.ttf is not a valid font file".
You can test it yourself in your computer and you'll see that the web font will still work only with the TTF. (without including the woff / eot files in #font-face)
That's exactly what I want to do to my own fonts.
That way they would still work as web fonts, and will not work as desktop fonts, making it harder for untrained people to install them without a license.
However, I can't figure out how they did it.
Any ideas?

The OS has different requirements for what constitutes as a valid font than a web browser. A web browser is more lenient when the font misses certain pieces of data. The trick is to figure out how much you can "mangle" a font so that it's not installable, but still passes OTS and is usable in a browser.

On the webpage indicated as an example, the font is served in Embedded OpenType format.
Embedded OpenType (EOT) fonts are a compact form of OpenType fonts designed by Microsoft for use as embedded fonts on web pages. [...] These font files can be created from existing TrueType font files using Microsoft's Web Embedding Fonts Tool (WEFT), and other proprietary and open source software. [...] The font files are made small in size by use of subsetting (only including the needed characters), and by data compression (LZ compression, part of Agfa's MicroType Express). (Wikipedia)

Related

Can I use otf font in codename 1?

Most of the fonts are OTF format, especially in Asia. Can I use the OTF format font in the cn1 theme? And the size of most OTF font files is more than 20MB. If I use 2 Asian OTF files in my project, the compiled file will be more than 50MB(codename1 limitation).
I have tried to convert OTF to TTF with online tools, but all of them failed to convert.
How do I use OTF font with codename1?
Thank you.
At the moment we don't have support for OTF fonts. The main challenge is passing this support through the full chain and all the supporting tools. As you indicated the size of a full unicode font is indeed a problem as well. For the case of TTF you can download the font after install and load it dynamically, although I understand this isn't an ideal situation and will severely hinder the development process.

Using custom icon assets with DesktopAppConverter UWP

I'm using DesktopAppConverter to convert my WPF application into a windows store compatible app. Right now I'm able to get the AppX built but the problem is to do with my application assets.
At the moment, DesktopAppConverter is taking my existing Icon (which looks great in WPF) and using it to somehow create all the different Assets at different resolutions for the UWP app. The icons it creates are coming out looking terrible, really blocky and clearly upscaled.
The way I'm looking at it is that there's 2 options.
1 - I specify a really large Icon file in my WPF app that might somehow end up being scaled better inside DesktopAppConverter. The problem here is that with a large resolution Ico file, I end up with a crazy large file (Ico's don't compress very well from what I understand).
2 - I specify a folder of correctly scaled assets (created using UWP Tile Generator) when building through DesktopAppConverter. This is what I'd like to do. I don't really want to be tweaking my Assets every time.
The 3rd choice is the one I'm heading towards, but don't really want to do. It involves building with AppX, then replacing the assets, then using MakeAppX, then re-signing with the SignTool. All of that seems really unnecessary, so I'm hoping someone from MSFT can let me know I'm missing something fundamental.
Thanks.
The easiest way to handle the visual assets for your app package is to use the package manifest editor in Visual Studio 2017.
To use it for your converted app, create an empty UWP project and add the output of the conversion (incl. your appx manifest) in this project. Now you can use the editor to manage the visual assets, build your packages for store submission and much more.
Here is a document that describes the process:
https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net
Thanks,
Stefan Wick - Windows Developer Platform

which files are need to be packaged with cefsharp winforms application

By using CefSharp version 37.0.0 my winforms application is ready to submit in college but I am not getting which files (DLL,exe,pak) are need to be packaged along with project references. I already gone through this article https://github.com/cefsharp/cef-binary/blob/master/README.txt#L104-L106 but still confused in :
Is all .pak files (cef.pak,cef_100_percent.pak,cef_200_percent.pak,devtools_resources.pak and all files from locales folder) are used for developer option?
Can I make separate folder cefSharp reference files?
It's hard to give a definitive complete answer, so: "It depends" on what your application uses. For .pak files e.g. if you are not using the DevTools in your application you can skip devtools_ressources.pak etc. similarly with languages and e.g. WebGL and other of the CEF .dll files.
See https://github.com/cefsharp/CefSharp/issues/527 for a discussion already marked faq-able! it also contains info on setting path for .pak files. You can inspect the binaries etc. of the resulting WinForms application at https://github.com/rfgamaral/SlackUI/releases.
Moving .dll files around is not recommended/supported.
Also see this related SO entry: What is the purpose of the cef.pak file in cefsharp?
In theory, you can see a rundown of all the files here:
https://bitbucket.org/chromiumembedded/cef/src/aefb5ccce879f308f0bcc3ac719c86defe2f9715/tools/distrib/win/README.redistrib.txt?at=master
However, one thing they don't note about not including cef.pak (or disabling pak loading altogether) is that it will cause things like red scrollbars (at least on windows). I've found I need to include cef_100_percent.pak to avoid this.

Updating DotNetNuke image library

Have written simple file picker control for my dotnetnuke site, because the one that ships with dnn doesn't really do what I need. The file picker uses System.IO for collecting directory information and uploading files to the portals root and subfolders. These images can then be inserted where ever I need them. The problem is images uploaded in this manner don't seem appear appear in the file manager or image manager used by the html/text module.
Is there anyway I can register these files with dnn when I upload them so they will also appear in the html/text image manager?
What would be even better is if there is a way to use the image manager that is built in the html module, outside the module although am not looking to buy a pre-made module.
Any thoughts?
You would want to use the DNN API for uploading files.
As for using the built in Image Manager that you find in the HTML module, that is part of the Telerik Rad Editor. You might be able to dig through the source for the Rad Editor Provider and figure out how to include just that portion into an outside module, though that might technically require a valid Telerik license to do.

How to install fonts on Windows & MAC using Silverlight?

I am creating a silver light 4 application which shows Hindi text using my custom Unicode font, its working fine when I embedded it in silver light application.
Custom font size is approximately 15 MB after compress in xap, it's too big. So is there any possible way to installed font on client machine using Silverlight.
I do not belive there is a way to actually install it, unless it is possible in a trusted SL4 Out Of browser app.
What you may want to do is package the font in a separate resource assembly and enable application library caching on the silverlight application.
You can do what was done over here to create a sub-set of your font using Blend SDK to make it much smaller: How to Create Subset Fonts in .NET?

Resources