I am trying to write a script that automatically and silently moves a bunch of fonts into the Fonts special folder so they are available as if you had 'installed' them from Explorer (by dragging and dropping, copying, or right-click and choosing Install). I have the
Shell.Application part down all the way to the copy.
However, some systems may already have the fonts installed and I want the progress dialog to be hidden and any prompts to be silently accepted.
So, I'm investigating the
Folder.CopyHere option flags.
I hope they are supported in this folder (some options are ignored by design). And I think these are in decimal, right? Do they need to be converted? However I pass them in, I still see both dialogs. I have tried
And, if I can get one option working, how do I get both working? Do I
bor them together? What about the formatting?
Or do I add them or convert them to hex?
Anthony Mastrean
Anthony MastreanAnthony Mastrean
14.5k1919 gold badges8383 silver badges149149 bronze badges
7 Answers
You can use
4 -bor 16 . It is hard to tell what this method expects since the type is VARIANT. I would have thought that it would take an integer value. If that doesn't work, this comment from the MSDN topic on Folder.CopyHere implies that a string should work:
Although I wonder if the format string should be
'0x{0:x}' ?
Just be aware that for normal .NET flags style enums, you can pass multiple flags to a .NET (or command parameter) that is strongly typed to the enum like so:
Oisin has written up some info on this subject in this blog post.
Keith HillKeith Hill
149k2828 gold badges275275 silver badges315315 bronze badges
I had the same problem and found this in another thread, Worked perfectly for me.
If you want it to overwrite AND be silent change 0x10 to 0x14 (docs).
user714429user714429
The
Folder.CopyHere option flags may simply not work. This makes me sad. I'll have to investigate one of these other methods, all of which leave me in a bit of a bind.
Separate Process
Invoke the copy in a new process and hide the window using the
ProcessStartInfo properties. I haven't implemented this yet, but I wonder if it will address the user-prompting for overwriting existing files?
For Loop
Only copy non-existing items. This seems to fall down when I actually want to update an existing font with a new font file of the same name.
Remove Existing
I'm thinking of removing all fonts of the same name as the ones I'm copying, then copying the set. Although that's kind of brutal. And I believe that there's another prompt if that font cannot be deleted because it's in use. sigh
Anthony MastreanAnthony Mastrean
14.5k1919 gold badges8383 silver badges149149 bronze badges
The copy flags don't work for me. I setup a job in the install fonts script that detects the 'Installing Fonts' window and send
{Enter} to it so I am not overwriting existing fonts.
After all fonts are copied/installed.. I remove the job, by name.
That works for me on Windows 7, 8.x, & 10.
Anthony Mastrean
14.5k1919 gold badges8383 silver badges149149 bronze badges
ubieubie
I'm seeing a number of Unzip folder operations, but really no one writing a solution to fit the Fonts folder situation. So I wrote my own! As it turns out, the Fonts folder does implement the Shell.Folder.CopyHere method, but does not honor any overloads passed for the second argument of the method. Why? Who knows! I suspect Raymond Chen of 'The Old new Thing' Windows Developer blog could explain it, but I don't know the answer. So we need instead to intelligently look for our fonts before trying to copy them, or we'll get a nasty message.
In my code, we check to see a font exists or not by checking for a match on the first four characters of the font name with a wildcard search. If the font doesn't exist, we assume this is the first time we're installing fonts on this system and set a special flag called $FirstInstall.
From then on in the script, if $FirstInstall is true, we install every font in the source font directory. On subsequent executions, we check to see if each font is a match, and if so, we abort that copy. If not, we go ahead and copy. This seems to work for most of my clients, thus far.
Here you go!
FoxDeployFoxDeploy
6,25622 gold badges1717 silver badges3131 bronze badges
You can just take a sum of your options. I was need to run CopyHere with two options - SILENT and NOCONFIRMATION. Look at the sample below:
kirill.bugakirill.buga
80311 gold badge99 silver badges2020 bronze badges
iamkrilliniamkrillin
6,22311 gold badge1919 silver badges4747 bronze badges
Not the answer you're looking for? Browse other questions tagged powershellcom or ask your own question.
I have 3 font files on my desktop that I placed there temporarily to do some testing with them. I installed them 'temporarily' using suitcase fusion.
However, since then I am not able to delete those fonts from my computer.Suitcase fusion shows that they are not activated, and I have no programs open (after a fresh restart) and I can't delete those files. In control panel > fonts window, these fonts are shown with a shortcut arrow symbol on them (what does that mean?).I used nirsoft's 'open files viewer' to see if they were open and they are shown to be open, and the process is shown as 'System process'
EDIT : I also tried to delete from the control panel - it asks to confirm delete, I confirm, but it doesn't actually delete.
What can I do to delete these font files?
(Using Windows 10 Pro 64 bit)
Thanks,
David
DaveyD
DaveyDDaveyD
3 Answers
This Registry key manages fonts that the system knows about:
I discovered in an older answer that removing a value of that key or changing a value's data to point to a nonexistent file will make Windows not see the font as usable.
Therefore, if you remove the Registry entries that correspond to the fonts you want to torch (and then restart to make the system reload everything), you should be able to delete the fonts' files.
Community♦
Ben NBen N
30.7k1313 gold badges105105 silver badges152152 bronze badges
If the above does not work on Windows 10, you can also STOP and DISABLE the following two services:
Reboot your computer, delete the font files, and re-enable the services by setting the Startup Type back to 'Manual'.
Stephen Rauch
2,32588 gold badges1717 silver badges2525 bronze badges
Hans ErlangHans Erlang
I had some fonts that were installed in my local app data folder
C:/Users/<name>/AppData/Local/Microsoft/Windows/Fonts/ . In order to delete them I had to delete the corresponding registry values in HKEY_CURRENT_USER :
I then had to sign out and in again before I could delete the fonts in File Explorer
binaryfuntbinaryfunt
54522 gold badges99 silver badges2424 bronze badges
Not the answer you're looking for? Browse other questions tagged windows-10fonts or ask your own question.
I want to use Google's Roboto font on my website and I am following this tutorial:
I have downloaded the file which has a folder structure like this:
Now I have three questions:
The example he uses this
What should my url look like, if I want to have the dir structure like:
/media/fonts/roboto
5,18477 gold badges3535 silver badges5050 bronze badges
user26user26
1,06755 gold badges1313 silver badges2121 bronze badges
9 Answers
You don't really need to do any of this.
The page will give you a
<link> element to include in your pages, and a list of sample font-family rules to use in your CSS.
Using Google's fonts this way guarantees availability, and reduces bandwidth to your own server.
Sunil Garg
4,87988 gold badges5555 silver badges8585 bronze badges
user1864610
There are TWO approaches that you can take to use licensed web-fonts on your pages: Nfs underground 3 download.
Long story short:
Using font hosting services along with @font-face declaration gives best output with respect to overall performance, compatibility and availability.
Source: https://www.artzstudio.com/2012/02/web-font-performance-weighing-fontface-options-and-alternatives/
UPDATE
Roboto: Google’s signature font is now open source
You can now manually generate the Roboto fonts using instructions that can be found here.
Dave Powers
73211 gold badge1212 silver badges2121 bronze badges
Ashesh Kumar SinghAshesh Kumar Singh
2,72411 gold badge1919 silver badges3636 bronze badges
Old post, I know.
This is also possible using CSS rocksteadyrocksteady
@import url :
1,15022 gold badges1515 silver badges2929 bronze badges
The
src refers directly to the font files, therefore if you place all of them on /media/fonts/roboto you should refer to them in your main.css like this:src: url('./fonts/roboto/Roboto-ThinItalic-webfont.eot');
The
. goes one folder up, which means you're referring to the media folder if the main.css is in the /media/css folder.
You have to use
./fonts/roboto/ in all url references in the CSS (and be sure that the files are in this folder and not in subdirectories, such as roboto_black_macroman ).
Basically (answering to your questions):
I have css in my media/css/main.css url. So where do i need to put that folder
You can leave it there, but be sure to use
src: url('./fonts/roboto/
Do i need to extract all eot,svg etc from all sub folder and put in fonts folder
If you want to refer to those files directly (without placing the subdirectories in your CSS code), then yes.
Do i need to create css file fonts.css and include in my base template file
Not necessarily, you can just include that code in your main.css. But it's a good practice to separate fonts from your customized CSS.
Here's an example of a fonts LESS/CSS file I use:
(In this example I'm only using the ttf)Then I use ArmfootArmfoot
@import 'fonts'; in my main.less file (less is a CSS preprocessor, it makes things like this a little bit easier)
3,36411 gold badge3131 silver badges5555 bronze badges
Use /fonts/ or /font/ before font type name in your CSS stylesheet. I face this error but after that its working fine.
Mohammed JavedMohammed Javed
59911 gold badge77 silver badges1919 bronze badges
Mr. NobodyMr. Nobody
Did you read the How_To_Use_Webfonts.html that's in that zip file?
After reading that, it seems that each font subfolder has an already created .css in there that you can use by including this:
1,56622 gold badges1313 silver badges1616 bronze badges
Font Cannot Be Deleted Because It Is In Use Today
it's easy
every folder of those you downloaded has a different kind of roboto font, means they are different fonts
Install the “modified by R2R” trial Version from the link below2. Steinberg cubase 8 pro torrent pc. Before heading out with the installation process please make sure to plug out/disable your Ethernet cable or simply block firewall access.Cubase 9 crack is only compatible with Windows 7, 8 and 10, Windows XP is not supportedOur greets go to all hard working groups.And middle finger to the people who make money with our effort.Support the good developer if you like it.We would like to support you for free as long as you understandwhat you are doing and what it means.”How to Install:1.
example: 'roboto_regular_macroman'
to use any of them:
1- extract the folder of the font you want to use
2- upload it near the css file
3- now include it in the css file
example for including the font which called 'roboto_regular_macroman':
watch for the path of the files, here i uploaded the folder called 'roboto_regular_macroman' in the same folder where the css is
then you can now simply use the font by typing
font-family: 'Roboto';
Omar MoustafaOmar Moustafa
Lead DeveloperLead Developer
Not the answer you're looking for? Browse other questions tagged htmlcssfonts or ask your own question.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |