Bumped SourceCodePro to 1.017
- Totally overhauled font install process since the previous version required lots of interaction / prompting to upgrade existing fonts AND had a clunky UI dialog when installing fonts for the first time - Leveraging Windows Powershell sample script that compiles C# on the fly to call Win32 APIs that deal with fonts - Elevate to admin to run the new stuff - no reboot required
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<metadata>
|
||||
<id>SourceCodePro</id>
|
||||
<title>Source Code Pro Programming Font</title>
|
||||
<version>1.010</version>
|
||||
<version>1.017.1</version>
|
||||
<authors>Adobe Systems Incorporated</authors>
|
||||
<owners>Ethan Brown</owners>
|
||||
<summary>Monospaced OpenType programming font</summary>
|
||||
@@ -14,9 +14,56 @@
|
||||
<licenseUrl>https://github.com/adobe/Source-Code-Pro/blob/master/LICENSE.txt</licenseUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<iconUrl>http://blogs.adobe.com/typblography/files/2012/09/SourceCodeSplash.png</iconUrl>
|
||||
<releaseNotes></releaseNotes>
|
||||
<releaseNotes> version 1.017 created 2013/01/11
|
||||
|
||||
Updates the hinting to the default asterisk in some styles that were missed in the previous version.
|
||||
Updates the design of the asterisk glyphs, bar, and broken bar.
|
||||
|
||||
|
||||
version 1.016 created 2013/01/09
|
||||
|
||||
Updates the hinting to the default asterisk in all styles.
|
||||
Adds an new Medium weight to the font project.
|
||||
Updates design of the following glyphs to center them within glyph height/width:
|
||||
lighttrpldashhorzbxd
|
||||
heavytrpldashhorzbxd
|
||||
lighttrpldashvertbxd
|
||||
heavytrpldashvertbxd
|
||||
lightquaddashhorzbxd
|
||||
heavyquaddashhorzbxd
|
||||
lightquaddashvertbxd
|
||||
heavyquaddashvertbxd
|
||||
lightdbldashhorzbxd
|
||||
heavydbldashhorzbxd
|
||||
lightdbldashvertbxd
|
||||
heavydbldashvertbxd
|
||||
|
||||
|
||||
version 1.013 created 2012/11/29
|
||||
|
||||
Updates design of asterisk and hyphen to accommodate coders' preferences.
|
||||
Realigns math and punctuation glyphs.
|
||||
Adds a stylistic set <ss01> for typographic alternates.
|
||||
Adds a stylistic set <ss04> for alternate dollar sign.
|
||||
Adds a small number of IPA characters.
|
||||
Adds box drawing characters and block elements.
|
||||
|
||||
|
||||
version 1.011 created 2012/10/19
|
||||
|
||||
Rebuilt fonts with new MakeOTF version.
|
||||
|
||||
version 1.010 created 2012/09/30
|
||||
|
||||
Fixed TrueType hinting problem in Bold ampersand.
|
||||
|
||||
version 1.009 created 2012/09/20
|
||||
|
||||
First release.
|
||||
</releaseNotes>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="tools\**" target="tools" />
|
||||
<file src="..\core\FontHelpers.ps1" target="tools" />
|
||||
</files>
|
||||
</package>
|
||||
|
@@ -1,7 +1,16 @@
|
||||
function Get-CurrentDirectory
|
||||
{
|
||||
$thisName = $MyInvocation.MyCommand.Name
|
||||
[IO.Path]::GetDirectoryName((Get-Content function:$thisName).File)
|
||||
}
|
||||
|
||||
try {
|
||||
$package = 'SourceCodePro'
|
||||
|
||||
$fontUrl = 'https://github.com/downloads/adobe/Source-Code-Pro/SourceCodePro_FontsOnly-1.010.zip'
|
||||
$fontHelpersPath = (Join-Path (Get-CurrentDirectory) 'FontHelpers.ps1')
|
||||
. $fontHelpersPath
|
||||
|
||||
$fontUrl = 'http://sourceforge.net/projects/sourcecodepro.adobe/files/SourceCodePro_FontsOnly-1.017.zip/download'
|
||||
$destination = Join-Path $Env:Temp 'SourceCodePro'
|
||||
|
||||
Install-ChocolateyZipPackage -url $fontUrl -unzipLocation $destination
|
||||
@@ -9,8 +18,22 @@ try {
|
||||
$shell = New-Object -ComObject Shell.Application
|
||||
$fontsFolder = $shell.Namespace(0x14)
|
||||
|
||||
Get-ChildItem $destination -Recurse -Filter *.otf |
|
||||
% { $fontsFolder.CopyHere($_.FullName) }
|
||||
$fontFiles = Get-ChildItem $destination -Recurse -Filter *.otf
|
||||
|
||||
# unfortunately the font install process totally ignores shell flags :(
|
||||
# http://social.technet.microsoft.com/Forums/en-IE/winserverpowershell/thread/fcc98ba5-6ce4-466b-a927-bb2cc3851b59
|
||||
# so resort to a nasty hack of compiling some C#, and running as admin instead of just using CopyHere(file, options)
|
||||
$commands = $fontFiles |
|
||||
% { Join-Path $fontsFolder.Self.Path $_.Name } |
|
||||
? { Test-Path $_ } |
|
||||
% { "Remove-SingleFont '$_' -Force;" }
|
||||
|
||||
# http://blogs.technet.com/b/deploymentguys/archive/2010/12/04/adding-and-removing-fonts-with-windows-powershell.aspx
|
||||
$fontFiles |
|
||||
% { $commands += "Add-SingleFont '$($_.FullName)';" }
|
||||
|
||||
$toExecute = ". $fontHelpersPath;" + ($commands -join ';')
|
||||
Start-ChocolateyProcessAsAdmin $toExecute
|
||||
|
||||
Remove-Item $destination -Recurse
|
||||
|
||||
|
Reference in New Issue
Block a user