How to either:
Install a custom font onto the Azure Websites instance (if it doesn't exist).
Inject the PrivateFontCollection into the active PrintDocument settings to override fonts utilized.
Situational Specifics:
The goal is to render the custom font OCR-A-Extended using Telerik reporting. Telerik's default statement is that the fonts must be installed on the system because that's what MS requires. Pre-generation, access to PrivateFontCollection does not appear available. The final assumption is that installation of a custom font is required.
Notes:
Direct access like "How can I install custom fonts on Windows Azure?" are not available as the GDI+ is being accessed via 3rd party dll.
Usage is a background process and not subject to CSS font loading since nothing is provided to the user, thus no dependencies on the user's system fonts.
Related
I'm using Ignition HMI application and it uses the JXBrowser as it's web browser component. I need to change the default image viewer used by JXBrowser to use a web-enabled browser with more capabilities (pan & zoom, called OpenSeaDragon).
How can that be done? I know you can get the BrowserPreferences, but I did not see anything specific to the default apps used.
OpenSeadragon is a JavaScript library that must be embedded into the web page and configured to provide an image viewer that can be used for panning, zooming, etc. I see they also provide a browser extension that allows you to view any image on a web page with their viewer, however, JxBrowser does not support Chrome/Chromium extensions at the moment.
I need some advice about Chromium extension possibilities. Can the extension change configs of the browser such as: home page, default behavior for protocol handlers (tel, mailto), security settings ("protect from dangerous websites" for example), disable sending statistics to Google, etc.?
Which configs from chrome://settings/ can be changed and how to do it if it's possible?
The Chrome API index is a good place to start.
From it, you can glean the following capabilities:
accessibilityFeatures API that deals with accessibility settings.
browsingData API that deals with clearing browsing data.
contentSettings API that deals with allowed content, site permissions and plugins.
downloads API can at least partially influence download settings.
fontSettings API can manage fonts used by Chrome.
management API can manage (but not install) other extensions.
privacy API deals with privacy-related settings (that includes some security settings).
proxy API can manage proxy settings.
In addition, there's a lot of Chrome OS specific APIs I won't list here.
There are also some manifest keys that can influence Chrome settings on install - such as the home page. See chrome_settings_overrides (note: not available on Linux) and to a lesser extent Override Pages.
See also Protecting user settings on Windows with the new Settings API (which announced the above).
Other than those, no, you can't override Chrome settings. You cannot dynamically change the home or search provider, you can't control protocol handlers (that's on OS level anyway), etc.
Note that you can't inject scripts into chrome://* pages, so you won't be able to just fiddle with the UI.
Context
I'm new to Vala development (although I have some years of experience with C#) under Linux, and I decided to recreate one of my C# programs, however, I need to use images in the UI.
My problem
How can I embed resource files (such as images) for later use in the UI? How to access them later? And how to put them in a button?
What I'm using
I'm using Linux (Mint) and Anjuta development IDE, with the Glade UI designer integrated. The Vala project targets a GTK+ 3.0 project.
What I've tried
I have tried adding a new specific objective for images, adding them into the project... But I don't seem to succeed.
I have seen the default images provided by Linux, and those work just fine, but I need to add my own.
Thanks in advance!
The normal approach would be to install your images to PREFIX/share/pixmaps/YOUR_APP. For example Gnumeric installs some .png files in /usr/share/pixmaps/gnumeric/.
You can use GResource to embed binary files (like images) into your executable if you really want to. The glib-compile-resources command can be added to your build system (see also this question).
You can also use icons from the users icon theme.
You didn't write what component you want to use to display your images, so I'll assume Gtk.Image here.
Gtk.Image has several constructors for the purpose of loading the image:
from_icon_name loads the image from the current icon theme (which is useful to support user themes).
from_resource loads the image from an embedded GResource.
from_file loads the image from a file.
See the main documentation of Gtk.Image for more methods. Some other widgets have similar methods to load images (for example toolbar buttons).
You should not use from_stock any more (There was a stock system in Gtk+ that is being replaced by freedesktop.org icon schemas).
My question is how do third party installer installs addons in the browser like toolbars and able to set homepage and other browser properties??
I want to make an addon which get installed in browser in same way..
is it possible??
In principle, installing extensions along with other software is possible. I'm describing the procedure for Windows.
The following conditions have to be met:
You must be able to write to the HKLM registry subtree (needs Admin rights)
The extension must be published on Chrome Web Store
The machine must be able to download the extension from Web Store
If those conditions are met, you can do it according to the procedure described here. Basically, the installer must create a registry key that will trigger Chrome to download the extension on next launch.
That said, Google has gone to great pains to prevent silent installs and avoid browser settings hijack. Such setting overrides are a weapons race and Chrome is tightening its defenses. Ask yourself whether it's ethical to install your extension this way.
It will probably annoy your users and will flag your extension for more meticulous checks by Google. Remember that Google can disable any extension hosted by the Web Store if it violates its policies.
Also, be mindful of the single purpose policy. A toolbar that also overrides search/homepage/settings will be frowned upon. At a minimum it should be separated into several extensions, at a maximum - don't do it.
An extension can override, say, a homepage, but it's very restrictive. The extension must be in the Web Store as above, and any override pages must be verified for ownership for the Web Store developer account. All in the name of security and comfort of the users.
Is it possible to create a browser extension that would allow page-controlled window opacity? Not so that various elements on the page are of a given opacity, but to allow one to see other windows (like the desktop) behind the browser page.
Thank you.
No, this is not possible in an extension. Such transparency would be handled at the window manager level, and would require platform-specific code. This means that either Chrome would have to add this feature and expose it as an extension API (currently no such feature exists), or you would have to write a plugin.