Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualjwezorek

Posted 29 January 2013 - 09:20 PM

I'm just having trouble with the "somehow mapping that font back to a font file" part.

 

Well, that code project code is doing the following ( I think)

 

(1) Uses the registry to get a list of registry key -> font filename mappings, where the registry keys are like marked-up display names.

(2) Given a font display name, returns the filename associated with the first registry key that includes the display name as a substring.

 

You could use (1) because it is presumably faster than iterating over the file system, but do something more intelligent for (2). Namely you could write a function that given a font display name returns the set of all likely registry keys and open just those font files to find the one you want. But I  don't know exactly what is in the registry; maybe what the code project project is doing is good enough.


#7jwezorek

Posted 29 January 2013 - 09:20 PM

I'm just having trouble with the "somehow mapping that font back to a font file" part.

 

Well, what that code project code is doing the following ( I think)

 

(1) Uses the registry to get a list of registry key -> font filename mappings, where the registry keys are like marked-up display names.

(2) Given a font display name, returns the filename associated with the first registry key that includes the display name as a substring.

 

You could use (1) because it is presumably faster than iterating over the file system, but do something more intelligent for (2). Namely you could write a function that given a font display name returns the set of all likely registry keys and open just those font files to find the one you want. But I  don't know exactly what is in the registry; maybe what the code project project is doing is good enough.


#6jwezorek

Posted 29 January 2013 - 09:19 PM

I'm just having trouble with the "somehow mapping that font back to a font file" part.

 

Well, what that code project code is doing the following ( I think)

 

(1) Uses the registry to get a list of registry key -> font filename mappings, where the registry keys are like marked-up display names.

(2) Given a font display name, returns the filename associated with the first registry key that includes the display name as a substring.

 

You could use (1) because it is presumably faster than iterating over the file system, but do something more intelligent for (2). Namely you could write a function that given a font display name returns the set of all likely registry keys and open just those font files to find the one you want. But I  don't know exactly what is in the registry.


#5jwezorek

Posted 29 January 2013 - 09:18 PM

I'm just having trouble with the "somehow mapping that font back to a font file" part.

 

Well, what that code project code is doing the following ( I think)

 

(1) Uses the registry to get a list of registry key -> font filename mappings, where the registry keys are like marked-up display names.

(2) Given a font display name, returning the first font filename registry key that includes the display name as a substring.

 

You could use (1) because it is presumably faster than iterating over the file system, but do something more intelligent for (2). Namely you could write a function that given a font display name returns the set of all likely registry keys and open just those font files to find the one you want. But I  don't know exactly what is in the registry.


#4jwezorek

Posted 29 January 2013 - 09:18 PM

I'm just having trouble with the "somehow mapping that font back to a font file" part.

 

Well, what that code project code is doing the following ( I think)

 

(1) Uses the registry to get a list of registry key -> font filename mappings, where the registry keys are liked marked-up display names.

(2) Given a font display name, returning the first font filename registry key that includes the display name as a substring.

 

You could use (1) because it is presumably faster than iterating over the file system, but do something more intelligent for (2). Namely you could write a function that given a font display name returns the set of all likely registry keys and open just those font files to find the one you want. But I  don't know exactly what is in the registry.


#3jwezorek

Posted 29 January 2013 - 09:18 PM

I'm just having trouble with the "somehow mapping that font back to a font file" part.

 

Well, what that code project code is doing the following ( I think)

 

(1) Uses the registry to get a list of registry key -> font filenames, where the registry keys are liked marked-up display names.

(2) Given a font display name, returning the first font filename registry key that includes the display name as a substring.

 

You could use (1) because it is presumably faster than iterating over the file system, but do something more intelligent for (2). Namely you could write a function that given a font display name returns the set of all likely registry keys and open just those font files to find the one you want. But I  don't know exactly what is in the registry.


PARTNERS