I use an embedded font in an apache fop 1.0 environment:
<fo:block-container
right="10mm" position="absolute">
<fo:block font-family="hnlt57con" >
my text
</fo:block>
</fo:block-container>
The configfile looks like this:
<fop version="1.0">
<renderers>
<renderer mime="application/pdf">
<fonts>
<font kerning="no" embed-url="Y:/test/helvetica-neue-lt-std-57-condensed.ttf" embedding-mode="subset">
<font-triplet name="hnlt57con" style="normal" weight="normal" />
</font>
</fonts>
</renderer>
</renderers>
This works fine, the text is rendered in the font hnlt57con.
What i want do now is render some text in bold:
<fo:block-container
right="10mm" position="absolute">
<fo:block font-family="hnlt57conbold" font-weight="bold" >
my text
</fo:block>
</fo:block-container>
The configfile looks like this:
<fop version="1.0">
<renderers>
<renderer mime="application/pdf">
<fonts>
<font kerning="no" embed-url="Y:/test/helvetica-neue-lt-std-57-condensed.ttf" embedding-mode="subset">
<font-triplet name="hnlt57con" style="normal" weight="normal" />
</font>
<font kerning="no" embed-url="Y:/test/helvetica-neue-lt-std-57-condensed.ttf" embedding-mode="subset">
<font-triplet name="hnlt57conbold" style="normal" weight="bold" />
</font>
</fonts>
</renderer>
</renderers>
Unfortunately a the text is not renderes in bold, but in the same way as in the example above.
Adding an additional font-triplet (as sugessted in http://www.scriptorium.com/whitepapers/fop_fonts/FOP_fonts5.html) does not change anything:
<fop version="1.0">
<renderers>
<renderer mime="application/pdf">
<fonts>
<font kerning="no" embed-url="Y:/test/helvetica-neue-lt-std-57-condensed.ttf" embedding-mode="subset">
<font-triplet name="hnlt57con" style="normal" weight="normal" />
</font>
<font kerning="no" embed-url="Y:/test/helvetica-neue-lt-std-57-condensed.ttf" embedding-mode="subset">
<font-triplet name="hnlt57conbold" style="normal" weight="bold" />
<font-triplet name="hnlt57conbold" style="normal" weight="700" />
</font>
</fonts>
</renderer>
</renderers>
The helvetica-neue-lt-std-57-condensed.ttf is a font that i converted myself from helvetica-neue-lt-std-57-condensed.otf using fontforge.
My questions:
How can i render some text in bold in an embedded font?
Is it possible, that the font is not usable in bold, since it is converted from an otf? In MS-Word however i can use it in bold.
Am i missing something?
Yes, you are missing the most important thing. A normal font is not a bold font, they are different things and hence different files. in your example, you are pointing the normal font and the bold font to the exact same TTF file (read: font file). Namely helvetica-neue-lt-std-57-condensed.ttf.
So you are telling FOP to use the exact same font file for both normal and bold and hence you see the same output.
To test this, try pointing the "bold" entry to a different TTF file you have. You will see the characters change to that font.
In short, "bold" fonts and "normal" fonts are not created from the same TTF font file, they are from two different files. You should be pointing the bold entry to a different file that has bolded glyphs.
Oh, and I should add, despite that fact that you think it works in Microsoft Word, you are truly mistaken. Word is either (1) using a different but similar font and not telling you or (2) :fake" bolding by bloating the pixels in the font. It is not using the exact different bold font unless you really have it installed in Windows and do not know it.
Related
I created an msi using wix installer but for this software to work we need to install another software. SO I want user to show a message as a dialog so that they will be aware of dependency package installation.
Once user click ok in this dialog background installation should progress
For this I created a custom dialog and called form my Produt.wxs, but it is not acting as information radiator but takes control of installation.
How can I spawn a information radiator after showing the welcome screen so once user click ok the dialog should go and next page of licence agreement should show.
Product.wxs
<Product Id="*" Name="Mentor PC" Language="1033" Version="1.0.0.0" Manufacturer="Waygate Technologies" UpgradeCode="303D1BF2-E4C1-44A3-9BBC-85D61CE0F7B7">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Manufacturer="Waygate Technologies" Description="Version 1.0" Comments="(C) 2020 Technologies" Platform="x64"/>
<MajorUpgrade AllowDowngrades="yes" Schedule="afterInstallValidate" />
<MediaTemplate EmbedCab="yes" />
<UIRef Id="SetupDialogUI" />
<Binary Id="bgPic" SourceFile="$(env.installer_icons_dir)/Technologies-dialog.png"/>
SetupDialog.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<UI Id="SetupDialogUI">
<Property Id="Ok">OKbtn</Property>
<Binary Id="OKbtn" SourceFile="$(env.installer_icons_dir)/OKbtn.bmp"/>
<Dialog Id="SetupDialog" Width="400" Height="300" Title="Waygate Technologies">
<Control Id="background" Type="Bitmap" Text="bgPic" Height="300" Width="400" X="0" Y="0" TabSkip="no" />
<Control Id="introText" Type="Text" X="130" Y="50" Width="350" Height="22" Transparent="yes" Text="{\TahomaHeader}Welcome to Metro App setup." />
<Control Id="explanationText" X="130" Y="100" NoWrap="no" RightAligned="no" Transparent="yes" Type="Text" Width="250" Height="100" Text="{\TahomaNormal}To continue with the setup click on the Install button. If you choose not to install this application, click on the Cancel button to exit." />
<Control Id="installButton" Type="PushButton" Text="[Ok]" Height="40" Width="100" X="170" Y="250" Bitmap="yes">
<Publish Event="EndDialog" Value="Return">1</Publish>
</Control>
</Dialog>
</UI>
<InstallUISequence>
<Show Dialog="SetupDialog" Before="ExecuteAction" />
</InstallUISequence>
Otherthan than "SetupDialog.wxs" I donty have any dialog files, its use default WIX provided
If you have a dependent install requirement then you'll need to chain your installs instead of embedding them. One of the limits of Windows installer is that only one install can be running at any given time in the ExecuteSequence. Also, have you considered your end user running your install silently? How would that be handled with dialogs?
To chain your installs you'll need to build a bootstrapper (setup.exe). Take a look at WiX Burn. Focus on the Chaining part.
I'm trying to set a custom icon for a specific file extension in the solution explorer in visual studio 2019. What do i need to add to the vsix project to make it happen?
I have tried to add a imagemanifest including the new icon as a .png file and in the pkgdef hook it up to the extension, but it will not show up. I tried a lot of different things to make it work. When i set an KnowMoniker as the icon for the extension it does show up.
The manifest is set to content and include in vsix is set to true.
The icon is set to resource.
icon.imagemanifest
<?xml version="1.0" encoding="utf-8"?>
<ImageManifest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/VisualStudio/ImageManifestSchema/2014">
<Symbols>
<String Name="Resources" Value="/Test;Component/Resources" />
<Guid Name="Guid" Value="{35e0e52d-a955-451d-86e4-5813fef55368}" />
<ID Name="icon" Value="1" />
</Symbols>
<Images>
<Image Guid="$(Guid)" ID="$(icon)">
<Source Uri="$(Resources)/icon.png">
<Size Value="16" />
</Source>
</Image>
</Images>
<ImageLists />
</ImageManifest>
icon.pkgdef
[$RootKey$\ShellFileAssociations\.ext]
"DefaultIconMoniker"="35e0e52d-a955-451d-86e4-5813fef55368:1"
I'm using productbuild to create a .pkg installer for MacOS Mojave. I've read the schema reference for the Distribution.xml file. I am successfully using this to include a custom welcome. Therefore I know my resource path is being used correctly when I run:
productbuild --resources ./res --sign "$PKG_SIGN_ID" --distribution Distribution.xml foo.pkg
But I can't seem to create a custom background image. I've tried various jpg and png images.
I have read this question and answer and I've tried with and without a en.lproj subdirectory within my resources directory.
My Distribution.xml ends up looking like this:
<?xml version="1.0" encoding="utf-8"?>
<installer-gui-script minSpecVersion="1">
<background file="background.jpg" mime-type="image/jpeg" scaling="tofit"/>
<welcome file="welcome.html"/>
<title>My App</title>
<pkg-ref id="com.foo.myapp"/>
<options customize="never" require-scripts="false"/>
<choices-outline>
<line choice="default">
<line choice="com.foo.myapp"/>
</line>
</choices-outline>
<choice id="default"/>
<choice id="com.foo.myapp" visible="false">
<pkg-ref id="com.foo.myapp"/>
</choice>
<pkg-ref id="com.foo.myapp" version="1.0" onConclusion="none">foo.pkg</pkg-ref>
</installer-gui-script>
Is this no longer possible to do with Mojave?
I found the issue. My problem was I was running in "Dark Mode".
If you want to set the background image of an installer for DarkMode you need to use the tag background-darkAqua otherwise it will never show:
<background-darkAqua file="background.png" mime-type="image/png" scaling="tofit"/>
I set up a basic Cordova project, and whenever I run cordova build, the config.xml file in Windows gets re-written to defaults, I added the following lines to change the icon of my project. When I run the project I can see that my icon have been changed but when I go to the bld/Debug/platforms/windows/config.xml it is in the default format and I cannot see the lines that I have added. So i get the default cordova icon instead. So I cannot deploy the app to the windows store. Very strange. Is anyone got any idea about this.
<platform name="windows">
<icon src="res/icons/windows/logo.png" width="150" height="150" />
<icon src="res/icons/windows/smalllogo.png" width="30" height="30" />
<icon src="res/icons/windows/storelogo.png" width="50" height="50" />
</platform>
Thank you
Do not surround it with platform and try it like this. It should work.
<icon src="res/icons/windows/logo.png" platform="windows8" width="150" height="150" />
<icon src="res/icons/windows/smalllogo.png" platform="windows8" width="30" height="30" />
<icon src="res/icons/windows/storelogo.png" platform="windows8" width="50" height="50" />
i have installed the newest WiX (Installer) for my Visual Studio, and when i want to set the icon, it always ends blank. i'm trying to set the icon of the Entry in "All Windows Software"
in the following Picture you can see how the Icon looks like (Image is from the Internet, not from my example)
http://i.stack.imgur.com/smPKe.png
my code:
<Icon Id="Icon" SourceFile="logo_16.ico"/>
<Property Id="ARPPRODUCTICON" Value="Icon" />
allready tried different .ico-files. Anyone who knows why and how to solve the problem?
please make sure the file is located in the correct directory
< Icon Id="ATE_GUI.ico" SourceFile="..\src\ATE_GUI\res\ATE_GUI.ico"/><br>
< Property Id="ARPPRODUCTICON" Value="ATE_GUI.ico" />
this is an example of usage:
< Feature Id='Complete' Title='ATE' Description='The complete installation' Display='expand' ConfigurableDirectory='INSTALLFOLDER' Level='1'>
<ComponentRef Id='ProgramMenuDir' />
< /feature>
<Component Id="comp_bin_debug_30" Guid="EB4650EB-75DC-4562-9DC3-8FFDD9B55468">
<File Id="file_bin_30" Source="..\bin\Debug.x64\ATE.exe" KeyPath="yes" DiskId="1" />
<Shortcut Id="startmenuATEDebug" Directory="ProgramMenuDir" Name="ATE (Debug.x64)"
WorkingDirectory='INSTALLDIR' Icon="ATE_GUI.ico" IconIndex="0" Advertise="yes" />
</Component>