|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
private font collection - deleteOkay, last go 'round for today. I'm looking at the msdn for private font
collections. If I add a font to work with - let's presume I'm printing a single line in a particular font and won't use it again - how do I dispose of it. For the sake of arguement, let's assume I'm printing (to the rtb) a sample of several (hubdred?) fonts on my system -- once I've printed the sample text, I no longer have need of that particular font, but see no way to reverse the .addfontfile. Memory may be cheap - but it would seem practical to be able to dispose of the font once done ... Am I missing the obvious here?? //al Hello al,
You must dispose the PrivateFontCollection, you can't remove individual fonts. I did a program to print samples of fonts and my solution was to create a new PrivateFontCollection for each page and dispose it after printing the page, as those fonts wouldn't be used in the next page. Regards. Show quoteHide quote "al jones" <alfredmjo***@shotmail.com> escribió en el mensaje news:1kl283q7asjsh$.k1az7aeh6hp0$.dlg@40tude.net... | Okay, last go 'round for today. I'm looking at the msdn for private font | collections. If I add a font to work with - let's presume I'm printing a | single line in a particular font and won't use it again - how do I dispose | of it. | | For the sake of arguement, let's assume I'm printing (to the rtb) a sample | of several (hubdred?) fonts on my system -- once I've printed the sample | text, I no longer have need of that particular font, but see no way to | reverse the .addfontfile. Memory may be cheap - but it would seem | practical to be able to dispose of the font once done ... | | Am I missing the obvious here?? //al Hi,
I'm surorised you haven't come across the "Memory corruption or an access violation may occur in a custom application that uses the PrivateFontCollection object in Windows XP" problem documented in KB 901026 when you are disposing of a lot of PrivateFontCollections. Show quoteHide quote "José Manuel Agüero" wrote: > Hello al, > > You must dispose the PrivateFontCollection, you can't remove individual fonts. > I did a program to print samples of fonts and my solution was to create a new PrivateFontCollection for each page and dispose it after printing the page, as those fonts wouldn't be used in the next page. > > Regards. > > > "al jones" <alfredmjo***@shotmail.com> escribió en el mensaje news:1kl283q7asjsh$.k1az7aeh6hp0$.dlg@40tude.net... > | Okay, last go 'round for today. I'm looking at the msdn for private font > | collections. If I add a font to work with - let's presume I'm printing a > | single line in a particular font and won't use it again - how do I dispose > | of it. > | > | For the sake of arguement, let's assume I'm printing (to the rtb) a sample > | of several (hubdred?) fonts on my system -- once I've printed the sample > | text, I no longer have need of that particular font, but see no way to > | reverse the .addfontfile. Memory may be cheap - but it would seem > | practical to be able to dispose of the font once done ... > | > | Am I missing the obvious here?? //al > Hello Nigel,
In fact, I did. My workaround for that problem was tu use a single PrivateFontCollection for each font, then dispose the font family before disposing the PrivateFontCollection: pfc = new privatefontcollection pfc.addfontfile("...") ff = pfc.families(0) 'Print the font sample ff.dispose pfc.dispose Regards. Show quoteHide quote "Nigel Borrill" <Agaric@community.nospam> escribió en el mensaje news:FEC89E47-4DC5-413E-BE54-F1B74F01D7AC@microsoft.com... | Hi, | | I'm surorised you haven't come across the "Memory corruption or an access | violation may occur in a custom application that uses the | PrivateFontCollection object in Windows XP" problem documented in KB 901026 | when you are disposing of a lot of PrivateFontCollections. | | "José Manuel Agüero" wrote: | | > Hello al, | > | > You must dispose the PrivateFontCollection, you can't remove individual fonts. | > I did a program to print samples of fonts and my solution was to create a new PrivateFontCollection for each page and dispose it after printing the page, as those fonts wouldn't be used in the next page. | > | > Regards. | > | > | > "al jones" <alfredmjo***@shotmail.com> escribió en el mensaje news:1kl283q7asjsh$.k1az7aeh6hp0$.dlg@40tude.net... | > | Okay, last go 'round for today. I'm looking at the msdn for private font | > | collections. If I add a font to work with - let's presume I'm printing a | > | single line in a particular font and won't use it again - how do I dispose | > | of it. | > | | > | For the sake of arguement, let's assume I'm printing (to the rtb) a sample | > | of several (hubdred?) fonts on my system -- once I've printed the sample | > | text, I no longer have need of that particular font, but see no way to | > | reverse the .addfontfile. Memory may be cheap - but it would seem | > | practical to be able to dispose of the font once done ... | > | | > | Am I missing the obvious here?? //al | >
Datagridview cell background color?
simple thread question appending colored / fonted <?> text to a richtextbox Drawing points in degrees!!! arraylist to use in another form Drawing a square (or circles) before each item of a treeview Textbox Click Event needed. 'System.Security.SecurityException' with .NET 2005 Only After 2003 to 2005 Upgrade Wizard, Getting System.Security.SecurityException Looking for a License Package |
|||||||||||||||||||||||