Results 1 to 26 of 26

Thread: Worries about fonts!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Nottingham, England
    Posts
    197
    I have used the font MonoType Corsiva in one of my programs, which I will be deploying using the Package and Deployment Wizard. I am really paranoid that the end user will not be able to support this font, resulting in another font being substituted. This could cause all sorts of sizing problems.

    Am I being over paranoid? Is there a way to package the font with the application to avoid these issues? How do I find out if this is a standard windows font or an extra?

    Hope someone can help me out. Many Thanks,

    Steve.
    Sent by: Steve Barker
    E-mail: [email protected]

    P.S. I KNOW 1 is not a prime!
    See this thread: http://forums.vb-world.net/showthread.php?threadid=26485

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    From one steve to another: you can never be too paranoid in programming. There is always 1 person where something goes wrong, and the user knows nothing about computers and can't fix it. Do everything you can to make sure it works right.

    this is a good installation program (recommended by denniswrenn) http://www.jrsoftware.org

  3. #3
    Addicted Member krah's Avatar
    Join Date
    Jan 1999
    Location
    Arkansas, her hyuck!
    Posts
    163

    Cool

    I know the feeling mister! I also would like to know the answer to this question. I bet you're kind of pizzed that I didn't really supply you with any useful information but look at it this way- I moved the message up to the top.

    BTW- Explain how 1 is a prime because I was always taught that 1 was a "special" number (let's face it, they're all special!) and that since it is only divisible by itself that it is not a prime.
    Is it tired in here or is it just me?

    Ryan Williams
    -Using Vb6-

  4. #4
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    1 is divisible by 1 and itself.

    Sending this post back to the top

  5. #5
    Fanatic Member
    Join Date
    Apr 2000
    Location
    Whats a location?
    Posts
    516

    Wink Sending it back to the top again

    1 is not a prime. It just isn't. That's what they tell us so we'd better shut up and listen .

    Does that really affect anybody's life, if 1 is a prime or not? I would care more if the Uzbekistanian President's daughter's accountant swatted a fly. Does it really matter? Really? Is it up there with 'why are we here?' and 'where will it end?' and 'is there other life in the universe?' ? No. It's a boring little trivial question about which neither I nor the majority of himan beings care.

    So if I care so little, why did I write a 17 line thread about it?



    That's just one of my charming eccentricities.
    Courgettes.

  6. #6
    Addicted Member Xenonic_Rob's Avatar
    Join Date
    Jun 2000
    Location
    England, UK
    Posts
    213

    Wink Back to the subject....

    I think you can.
    As long as you specify the Package and Deployment Wizard to put the font in the C:\Windows\Fonts folder, it should register itself. I think....

    Rob Wright
    E-mail: [email protected]
    Website: http://www.xenonic.com
    The First Member of Honeybee's Club
    Favourite words: Zugzwang and Empiric

  7. #7
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    getting back off topic

    my life depends on 1 being prime. I don't know why, thats just the way my liver works.

  8. #8
    Lively Member
    Join Date
    Mar 2000
    Posts
    81

    Unhappy It just doesn't deserve it

    I know this doesn't deserve to be back at the top but I had to put in my two pennerth. If we treat 1 as a prime our little rules of maths would break down - for instance, all numbers would have an infinite number of prime factors:

    28 >> 7,2,2

    would become

    28 >> 7,2,2,1,1,1,1,1,1,1,1...ad infinitum - craziness

    Also, surely it's illogical to say that 1 is divisible by 1 and itself. That's like saying my name is both Sam and Sam. Yet more craziness. I'm sure there are many more reasons on top of the two I have pointed out.

    In short, I thoroughly recommend you look into altering your handle - if this is not possible then as of this moment you should be forever banished from the vb-world forums, as a traitor to the prime family...

  9. #9
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169

    on topic...off topic...on topic...off topic...on topic

    Okay. Fonts. Just copying it won't help, as it needs to be entered into the registry. Check out this key: HKLM\Software\Microsoft\Windows\CurrentVersion\Fonts

    Inno Setup (mentioned earlier) lets you do this.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  10. #10
    Lively Member
    Join Date
    Mar 2000
    Posts
    81

    Lightbulb Maybe try this?

    Presumably you could get the installation package to drop the font into the font folder and then add a routine at the beginning of your application, which, before any forms become visible to the user, enters the font information into the registry. Perhaps kickstarting the program with a Sub_Main() rather than a form would suffice. The registry's font information looks simple and replicatable enough to me. VB-world has a helpful section on registry access at http://www.vb-world.net/registry/registry2/

    Is that any help?

  11. #11
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Here's an example project: http://www.parksie.uklinux.net/registry.zip
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  12. #12

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Nottingham, England
    Posts
    197

    Right, let's get this cleared up!

    Let's get this whole "1 is a prime!" thing sorted out, once and for all.

    Firstly, not wishing to brag, but I've just graduated in Mathematical Physics. I'm not 100% sure, but seem to remember, that by the strict definition of a prime number, 1 is not considered to be prime. I was not able to find concrete proof of this in my old text books, however. Samdv's argument is fairly convincing though, so I would go with 1 not being a prime.

    So, you're probably wondering (heck! who am I kidding, no-one reall cares do they, let's be honest), "Why the incorrect handle?" Well, it comes from a joke, which I'd like to share with you, if you don't mind.

    Are you sitting comfortably? Then I'll begin...

    An engineer, a physicist, a mathematician and a computer programmer have all applied for the same job. Right through every stage of interviews, there was nothing what-so-ever to separate the four candidates, and so the interviewer decides to pose a tie-break question to see who gets the job. He says to the four nervous hopefulls, "Work out the first 100 prime numbers. Whoever gets the closest can have the job!"

    ...So, after a few hours, the four interviewees return to hand in their solutions. The engineer, after having practically worn his slide rule away to nothing, says, "Well, 1 is a prime, 3 is a prime and 5 is a prime. After that, 7 is a prime, 9 is a prime, 11 is a prime, 13 is a prime and 15 is a prime. Infact all odd numbers are prime." The engineer is escorted from the building.

    Next up is the physicist. After having completed some very intricate experiments, using expensive equipment (all payed for by the tax payer), he says, "3 is a prime, 5 is a prime, 7 is a prime, 11 is a prime, 13 is a prime, 15 is a prime (to within experimental error)..." He too is shown the door.

    Up steps the mathematician, who, after carrying out a complex but incredibly efficient algoithm (in his head, of course), correctly states the first 100 prime numbers.

    So, it's betweem the mathematician and the computer programmer. The programmer strides confidently into the interview room and hands the interviewer a print out. He says, "I have written a program which calculates the first 100 prime numbers. Here are my results."

    On the paper is printer the following:

    1 is a prime
    1 is a prime
    1 is a prime
    1 is a prime
    1 is a prime...

    Sorry!

    I used this joke as an insult on my house mate, who was studying computer science last year. The ironic thing is, that of the two of us, I have gone into computer programming.

    1 is a prime, indeed!

    Thanks very much for your help with the fonts guys!

    Cheers,
    Steve
    Sent by: Steve Barker
    E-mail: [email protected]

    P.S. I KNOW 1 is not a prime!
    See this thread: http://forums.vb-world.net/showthread.php?threadid=26485

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Nottingham, England
    Posts
    197

    Wink The final word!

    Hope this end the debate:

    one:

    The number one is far more special than a prime! It is the unit (the building block) of the positive integers, hence the only integer which merits its own existence axiom in Peano's axioms. It is the only multiplicative identity (1.a = a.1 = a for all numbers a). It is the only perfect nth power for all positive integers n. It is the only positive integer with exactly one positive divisor. But it is not a prime. So why not? Below we give four answers, each more technical than its precursor.

    Answer One: By definition of prime! The definition is as follows. An integer greater than one is called a prime number if its only positive divisors (factors) are one and itself. Clearly one is left out, but this does not really address the question "why?"

    Answer Two: Because of the purpose of primes.
    The formal notion of primes was introduced by Euclid in his study of perfect numbers (in his "geometry" classic The Elements). Euclid needed to know when an integer n factored into a product of smaller integers (a non-trivially factorization), hence he was interested in
    those numbers which did not factor. Using the definition above he proved:

    The Fundamental Theorem of Arithmetic:
    Every positive integer greater than one can be written uniquely as a product of primes, with the prime factors in the product written in order of nondecreasing size.

    Here we find the most important use of primes: they are the unique building blocks of the multiplicative group of integers. In discussion of warfare you often hear the phrase "divide and conquer." The same principle holds in mathematics. Many of the properties of an integer can be traced back to the properties of its prime divisors,
    allowing us to divide the problem (literally) into smaller problems. The number one is useless in this regard because a = 1.a = 1.1.a = ... That is, divisibility by one fails to provide us any information about a.

    Answer Three: Because one is a unit.
    Don't go feeling sorry for one, it is part of an important class of numbers call the units (or divisors of unity). These are the elements (numbers) which have a multiplicative inverse. For example, in the
    usual integers there are two units {1, -1}. If we expand our purview to include the Gaussian integers {a+bi | a, b are integers}, then we have four units {1, -1, i, -i}. In some number systems there are infinitely many units.

    So indeed there was a time that many folks defined one to be a prime, but it is the importance of units in in modern mathematics that causes us to be much more careful with with the number one (and with primes).

    Answer Four: By the Generalized Definition of Prime.
    There was a time that many folks defined one to be a prime, but it is the importance of units and primes in in modern mathematics that causes us to be much more careful with with the number one (and with primes). When we only consider the positive integers, the role of one as a unit is blurred with its role as an identity; however, as we
    look at other number rings (a technical term for systems in which we can add, subtract and multiply), we see that the class of units is of fundamental importance and they must be found before we can even define the notion of a prime. For example, here is how Borevich and Shafarevich define prime number in their classic text "Number Theory:"
    An element p of the ring D, nonzero and not a unit, is called prime if it can not be decomposed into factors p=ab, neither of which is a unit in D.

    Sometimes numbers with this property are called irreducible and then the name prime is reserved for those numbers which when they divide a product ab, must divide a or b (these classes are the same for the ordinary integers--but not always in more general systems). Nevertheless, the units are a necessary precursors to the primes, and one falls in the class of units, not primes.

    BTW - I'm NOT changing my Handle.

    Cheers,

    Steve. (The 1 and only!)
    Sent by: Steve Barker
    E-mail: [email protected]

    P.S. I KNOW 1 is not a prime!
    See this thread: http://forums.vb-world.net/showthread.php?threadid=26485

  14. #14
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    So back to the important question.. who got the job?

    While we are bagging comp programmers can i do one that bags economists....

    A physicist, engineer and economist are stuck on a deserted island with only a palm tree (that was sort of there already) and a can of beans. They are hungry and trying to work out how to open it.

    The physicist goes first and suggests that they utilise his spectacles to generate heat from sunlight and burn a hole in the lid. But the economist calls him stupid and says that the can will blow up and they will have no beans (except sandy ones)

    The engineer suggest climbing the palm tree and dropping the can so that it will open on impact. Again, the economist pours scorn on this idea saying that the can will break and the beans will go everywhere.

    In exasperation the physicist and chemist turn on the economist and say "well if you are so smart you tell us how to open it"

    The economist says "it's easy. First, we assume that we have a can opener...."
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Nottingham, England
    Posts
    197
    Who got the job? The Mathematician... of course!

    I thought this thread had a died a death! Thanks for breathing new life into it Beachbum!

    Economists..... Well, they draw nice graphs I s'pose.

    Steve.
    Sent by: Steve Barker
    E-mail: [email protected]

    P.S. I KNOW 1 is not a prime!
    See this thread: http://forums.vb-world.net/showthread.php?threadid=26485

  16. #16
    Member
    Join Date
    Mar 2002
    Posts
    52
    I hereby declare the number 1 as a pineapple!

    Errmm.. don't ask me to justify it.

  17. #17
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545
    Actually..........







    The Toronto Maple Leafs are number 1!!!!!!
    After they walk all over Ottawa they are gonna play either Montreal or Caroline in the conference finals, and as we all know, they both SUCK!!!!. So toronto will have a few problems in the finals against detroit but they will win the cup in 7 games to end a HUGE drought!!!!

    Just thought I'd mention that.

  18. #18

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Nottingham, England
    Posts
    197
    I can't believe that:
    1) This thread hasn't died yet!
    2) It's deteriorated (from fonts and pure maths!) to sport and isomorpisms between fruit and numbers.
    3) How much I've changed as a developer since I started this thread all those months ago!
    Sent by: Steve Barker
    E-mail: [email protected]

    P.S. I KNOW 1 is not a prime!
    See this thread: http://forums.vb-world.net/showthread.php?threadid=26485

  19. #19
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497
    I've always been told that a prime:

    Is any number that cannot be derived by multipling two integer numbers aside from itself and 1.

    So, since 1*1 is not an option, if you can show me any other multiplication that will derive '1', then I'll beleive 1 isn't a prime.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  20. #20

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Nottingham, England
    Posts
    197
    Lord Rat: Good thinking, but....

    Using YOUR definition, 1 is not a prime number, since -1 and -1 are two integers that multiply to give 1. QED.

    I think you should read the section entitled The Final Word - it's in this thread. It is taken from another source (not my own work!), and is therefore trustworthy?!? I don't think we need say any more on the issue - The Final Word says it all really.

    The one and only Steve.
    Sent by: Steve Barker
    E-mail: [email protected]

    P.S. I KNOW 1 is not a prime!
    See this thread: http://forums.vb-world.net/showthread.php?threadid=26485

  21. #21
    Member
    Join Date
    Mar 2002
    Posts
    52
    Originally posted by 1 is a prime!
    I can't believe that:
    1) This thread hasn't died yet!
    2) It's deteriorated (from fonts and pure maths!) to sport and isomorpisms between fruit and numbers.
    3) How much I've changed as a developer since I started this thread all those months ago!
    The reason why it hasn't died yet is because you have a link to it in your sig

    I noticed your name and it caught my attention, so I followed the link and read the thread (hey, i wish i could rhyme all the time.. err and then i do it again .. umm i wish i could stop now but i don't know how ..) and replied to bump it cuz it's so off-topic it's cool like that

    You're welcome? Just how long ago was the thread started?

  22. #22

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Nottingham, England
    Posts
    197
    homncruse: I started the thread in August 2000, back in the days when I'd only just started with VB.

    Maybe if we can keep bumping this thread to the top it will aquire cult status! (Glad I grabbed the name while it was free!) I can feel this thread going retro...
    Sent by: Steve Barker
    E-mail: [email protected]

    P.S. I KNOW 1 is not a prime!
    See this thread: http://forums.vb-world.net/showthread.php?threadid=26485

  23. #23
    Member
    Join Date
    Mar 2002
    Posts
    52
    Originally posted by 1 is a prime!
    homncruse: I started the thread in August 2000, back in the days when I'd only just started with VB.

    Maybe if we can keep bumping this thread to the top it will aquire cult status! (Glad I grabbed the name while it was free!) I can feel this thread going retro...
    Wow that was like 1.5 years ago or something like that. Damn
    Glad I could revive it once again!

  24. #24

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Location
    Nottingham, England
    Posts
    197
    It'll never die!
    Sent by: Steve Barker
    E-mail: [email protected]

    P.S. I KNOW 1 is not a prime!
    See this thread: http://forums.vb-world.net/showthread.php?threadid=26485

  25. #25
    Member
    Join Date
    Mar 2002
    Posts
    52
    But it did.

    Now it isn't.

    Whee my first post in over a year happens to be here

  26. #26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width