What's the solution to "CreateFontPackage failed: Win32 error:1035"? - winforms

Trying to use the Libre Baskerville font in an RDLC but it causes an error on rendering:
CreateFontPackage failed: Win32 error:1035
There's little information online about this error (none of Google's results suggest any solutions) ... is there anything we can do about it other than switch to a more conventional font?

MSDN states that error 1035 stands for the "The font did not contain a loca table." error.
The 'loca' table is a part of a font definition. You can see detailed description here.
It seems that your font file is damaged. Try to download the font from another source or switch to another font.

I know this problem is a bit old, but right now I faced the same problem with "Helvetica-Neue" font, which is the corporate font for publications. I am building my reports with ReportBuilder 2.0 (SqlServer 2008).
Diagnostics:
I used the Microsoft Font Validator to check whether the font is "well-formed", here I could find that the original font (OTF by the way) could not be rastered due to missing tables.
Solution:
I decided to convert the OTF file into TTF (I googled for an online converter) then ran the test over the new TTF file for the same font, and everything was OK.
I went to the control panel to remove all the styles of the "Helvetica-Neue" font (I had about 50).
Installed the TTF I got from the conversion, and my problems were solved, the report was able to be exported to PDF without any problems.

Please provide more information related to this issue ..
Mainly
error:1035
1>
Am not sure if this will help but try removing the Datasource from the Report menu and then adding it again.
2>
created a new RDLC file for your report page.Try again .

Related

Some custom fonts are not showing in Silverlight

I'm using Visual Studio 2010.
I want to build an application displaying some text with custom fonts.
All the fonts are TrueType fonts, with the editable attribute, and are declared as resource with "Copy Always".
But, even at design time, some fonts are replaced by the standard Silverlight font, in the XAML editor.
For example I have 14 different versions of the Helvetica font (bold, oblique, italic, narrow, condensed... and mix of those). But only 3 are correctly displayed, others are using the fallback font. If I open the ttf files with the windows font preview application everything looks ok.
Any idea of what can be wrong ?
Thanks for your help.
After two months of hair pulling I've finally come with a simple solution :
Don't use - (dash) in your embedded font names
I hope it can help somebody.

Making icon for a Windows Form: How to make it show up correctly?

OK, so I have built a Windows Form application. I now want an icon for it. So I use the Icon Editor built into Visual Studio 2012. Draw it all out to look nice and purdy. Once I am done, I have a .ico file and I make it the default icon for the project, and also the icon for the one WinForm in the application.
Unfortunately, it does not show up as I have created it! It is displayed as the default icon file as it existed before I modified it in the icon editor. It's a 32x32 4 bit icon. If I change the extension to .bmp it shows up as the default.
It looks like the VS icon editor is editing something else, not the appearance of the icon. Can someone tell me what I am doing wrong?
I used to have a progam called IconArt that would create icons that looked like icons when I used them in VS. IconArt is now abandonware and won't run on my 64bit Windows workstation.
Since I didn't get any answers within the time I was hoping, I posted this question also in the MSDN Visual Studio forum, and got a good answer that I thought I should post here. Credit to Reed Copsey, Jr, for the answer!
This is it:
You'll need to put your design in all of the different versions. ICO
files contain multiple versions of the same image, for different
screen resolutions.
My personal preference is to not use VS - there's an ICO plugin for
Paint.Net (all free) which allows you to make a single image
(typically 256x256), and save multiple versions within an ICO file in
one shot. It's very useful for building icons.
See
http://forums.getpaint.net/index.php?/topic/927-icon-cursor-and-animated-cursor-format-v37-may-2010/
for the plugin.
Since I am a Paint.Net user, the plugin sounded like a great idea, and I tried it. Bingo! This works very nicely.

Add fonts to CKEditor (in Drupal)

I have downloaded three fonts - .tff files - from http://www.FontIneed.com and installed them under Linux. They are really installed throughout the system because they are now present in the OpenOffice suite fonts drop down boxes.
As I have installed CKEditor as rich text editor in Drupal, I have tried to add these fonts to it.
I already had a problem when testing in Drupal->Config->CKEditor->Advanced if the Javascript insertion works for a given profile. I entered exactly the example that is provided under the texfield box but, when created a new block in Full HTML, the fonts drop-down list presented the whole set of available fonts (not only the ones I have entered).
Then, I wanted to add my new fonts to the CKEDITOR.config.font_names in the plugin.js file (although I don't like that because it will blow-up my setting when new release will overwrite this file ...). But the new fonts don't show up.
What should I do?
Thanks
PS: I may have a problem entering their names. For example, I've got one font with the Zipty_Do.tff file; the first line of the file says 'Zipty Do, Regular' and that's the name I've entered
Regardless of wether you are able to get your new fonds to show up in CkEditor, I believe that if you have installed a free font, chances are that they are not standard system fonts. Without embedding the fonts on the site itself these fonts will only be available to you and will thus show up different to visitors of your site.
A module I found extremely helpful in embedding non system fonts is Cufon http://drupal.org/project/cufon. Hope this helps.

Visual Studio 2010 Designer Error on Run

I am using using VS2010 and if I have a form open in designer mode and run my application the designer tab will no longer show the form designer but instead an error will be displayed (and it is only fixed by restarting the IDE) saying:
"To prevent possible data loss before loading the designer, the
following errors must be resolved:"
1 Error:
"The designer could not be shown for this file because none of the
classes within it can be designed. The designer inspected the
following classes in the file: ##### --- The base class ##### could
not be loaded. Ensure the assembly has been referenced and that all
projects have been built"
I then shows the following call stack:
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
Any help is greatly appreciated this is really annoying.
Thanks,
Joel.
I get this visual studio bug too now and then, and I deeply ignore the error text, instead I do the following:
Close the Design-tab
Reopens the Design mode by double click in Solution Explorer, or by right clicking Source code tab and select View Designer
Suddenly everything works again!
If not helping, you may have to change bullet 2 into:
Close and restart Visual Studio.
Maybe this can help you out.
I usually close the visual form, rebuild the solution, right-click then select "view designer" in the form code.
Very, very annoying. I am thinking of dropping back to VS2008.
Close the form. Clean the solution. Rebuild the solution. Reopen the form. Worked for me when nothing else would.
I had this same issue and I was able to resolve this by creating new project and then compiled and run the project and then I imported all the files and ran the project again and automatically it was working again did nothing extra.
I'm able to avoid restarting VS by doing the following
Add a new user control
Drag and drop some of your custom user controls on to it (If it gives you an error, build the solution again).
Reopen your control.
In my case, I have a winforms project with several custom controls that are used by other custom controls. Whenever I open some of those custom controls, I get a the "The base class ..." error. Adding a new custom control, building the project and then adding some custom controls from my project to the new custom control allowed me to open the custom controls that were giving me the "The base class ..." error.
UPDATE: I think I found the problem. My controls were not 'added' properly to the csproj file. In the csproj file, the files for partial classes of UI controls/components need the 'DependentUpon' attribute.
E.x.:
before:
<Compile Include="Windows\Forms\DataGridView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Windows\Forms\DataGridView.Designer.cs" />
after:
<Compile Include="Windows\Forms\DataGridView.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Windows\Forms\DataGridView.Designer.cs">
<DependentUpon>DataGridView.cs</DependentUpon>
</Compile>
I had a situation where a custom user control appeared to be creating the error (not sure why) so I removed references to the user control from the form and the error went away.
It seems that after installing SP1 the problem has gone away.
Thanks for your help everyone.
I had the same problem using A control With Generics
MvpUserControl<Presenter,IViewMode> : UserControl
what I do it's Remove the Reference and Add again, Clean and Rebuild the Solution I Hope this can be useful for anybody else
I had the same problem with VS2010 SP1. Finally using Windows Update I saw some updates for Visual Studio and .Net, I installed them and is not happening any more.
Old post, but for those whom may find this...
Just ran in to this error and for me it was relatively simple fix.
Found that it may have something to do with the names of your classes, and renaming the problematic class to a higher order. That is the alphabetical order it appears in the assembly (Where A is higher than Z).
MSDN Article
Good luck.
This error occur if the Form class is not a first class in the file, for example if there is some helper class at the beginning of the file.
To solve this issue, move all other classes except Form class to the bottom of the file.
Don't code in Form1.Designer.cs. Move your logic to Form1.cs (hit F7 on Form1.cs [Design] tab).
"In the project file (.vcxproj), locate the entry for the target
Framework version. For example, if your project is designed to use the
.NET Framework 4.5, locate
v4.5 in the
element of the element. "
(Microsoft)
In my case the "v4.5" didn't exist so I add it, and everything is good now.
I tried clean solution and re-build solution and worked for me.
Hope this help!
This solution works fine, please follow these steps below to solve your problem:
Check the reference if load correctly
Clean the solution and rebuild again
Clean the project and rebuild again
Clean your project and open it again
I was login as administrator in visual studio . I just close my visual studio and again open it without run as administrator and my problem is solved
I ran into this today after upgrading VS2019. I went to properties, configuration tab, and set the projects to Configuration = Debug, Platform = Any CPU. Then it worked.
I faced this issue.
To prevent possible data loss before loading the designer, the following errors must be resolved:
I found solution for this problem:
Close all open tabs, and refresh (sync active documents) the solution.
For more information, you can see this video : https://youtu.be/Q3x2HBd7BDs

unblocking Ribbon WPF assembly for use in VS2010

I'm trying to open the sample Solution for the Microsoft Ribbon for WPF, but I get this error about being unable to load metadata. The solution on that site, and the one linked in the error, is How to: Use an Assembly from the Web in Visual Studio. However, I don't see any 'Unblock' option when I check the Properties dialog for RibbonControlsLibrary.dll in C:\Program Files (x86)\Microsoft Ribbon for WPF\v3.5.40729.1. This may be because when I downloaded the Ribbon stuff, it wasn't the library directly, but rather an installer for the library. How can I get rid of this error so I can actually see the design view of the sample XAML files for the Ribbon WPF?
Here is the full error message:
Unable to load the metadata for assembly 'RibbonWindowSample'. This assembly may have been downloaded from the web. See http://go.microsoft.com/fwlink/?LinkId=179545. The following error was encountered during load: Could not load file or assembly 'RibbonWindowSample' or one of its dependencies. The system cannot find the file specified.
According to the error message, it's not RibbonControlsLibrary.dll that's at fault, it's RibbonWindowSample. Have you unbolocked the solution file and files that form the project? If RibbonWindowSample came pre-compiled, you may need to re-build the solution to generate compiled assemblies that don't have the "web mark" on them.
Did you download a zip file? You need to unblock the zip before unzipping it. Once it's unzipped you won't be able to unblock the individual files that were in it.
Here's what to look for at the bottom of the properties dialog.
I was seeing the metadata error before building the Solution--it shows up when I first load the Solution. I tried building it just now and it built fine, plus the design view shows the XAML window. I don't know why I see the metadata error when it first loads but it goes away upon building.

Resources