FontMgr Release Notes First created on: 3/20/92 12:52:34 PM ----------------------------------------------------------•---------------------------------------------------------- 3/20/92 12:52:41 PM File: FontMgr.a,42 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1025041 > Release notes for this change: Clean up GetFONDForSizeAndStyle. The new version is much easier to read and understand, which should make life for future generations happier. > What was tested: Opened and closed all suitcases in the Finder, viewing each font, making sure that TrueType was used for TrueType fonts, and bitmap fonts were used for specific sizes, and that the correct styles were being used. Typed a bunch of text into MacWrite II, making sure that the correct font, size, and styles appeared. Made sure that TrueType was used when using a font size that didn’t have a bitmap available. ----------------------------------------------------------•---------------------------------------------------------- 3/25/92 5:45:13 PM File: OutlineMetrics.a,12 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1023489 > Release notes for this change: •BLT: Fix OutlineMetrics in 32 bit mode. A code path exists where the contour entry bit was not cleared from the high byte of the glyph offset before it is added to the glyphArray pointer, causing a bus error when OutlineMetrics is called. > What was tested: OutlineMetrics is called by the LaserWriter LS driver, so this crash occurs pretty frequently on that printer. With this change, it no longer crashes. ----------------------------------------------------------•---------------------------------------------------------- 3/31/92 2:23:30 PM File: FontMgr.a,44 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1024665 > Release notes for this change: Change all one deep Resource Manager calls back to their n deep counterparts. The reason the calls were made one deep in the first place was to make sure that an incorrect font was not accidentally fetched. Now that every font resource is ensured a unique resource ID, this will not happen, so it’s OK to use the n deep calls. This change effectively reverts the LoadNewStrike routine (with all it’s myriad entry points) back to the way it was before there was a Fonts folder. > What was tested: PageMaker uses a special font to draw it’s tools. Because the Font Manager was changed to use one deep calls, PageMaker’s tool window would get trashed and use Geneva to draw the tools under some circumstances. By going back to the n deep calls, PageMaker’s tools are never trashed. ----------------------------------------------------------•---------------------------------------------------------- 4/1/92 10:25:24 AM File: BassPatches.a,16 Owner: Yosuke Kurita Project: MainProj∫Toolbox∫FontMgr∫ File: DiskCacheExtensions.proto,3 Owner: Yosuke Kurita Project: MainProj∫Toolbox∫FontMgr∫DiskCache∫Prototype∫ File: DiskCacheExtensions.c,4 Owner: Yosuke Kurita Project: MainProj∫Toolbox∫FontMgr∫DiskCache∫Source∫ File: PartialFontExtensions.proto,3 Owner: Yosuke Kurita Project: MainProj∫Toolbox∫FontMgr∫PartialFont∫Prototype∫ File: PartialFontExtensions.c,4 Owner: Yosuke Kurita Project: MainProj∫Toolbox∫FontMgr∫PartialFont∫Source∫ Radar bug: #1023997 > Release notes for this change: InitializePartialFonts and InitializeDiskCache should be pascal function. > What was tested: Kanji TrueType works fine with a new ‘Two-Byte Script Extension’. ----------------------------------------------------------•---------------------------------------------------------- 5/3/92 2:05:12 PM File: Bass Owner: John Harvey Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1028023 > Release notes for this change: Changing JSR to newSfnt to a trap call. The reason for doing this is to give distributors like Elex in Korea at least some way to kind of copy protect their fonts. Now that NewSFNT is called via the trap, when Elex localizes they can patch NewSFNT and have it look for a dongle whenever a user wants to select one of their copy protected fonts. I’m not kidding myself that this is a very reliable or universal way to copy-protect these things, but it is better than nothing, and requires minimal effort on our part. > What was tested: Ran this build with a debugging break set for the NewSFNT trap. Made sure it was being called where expected. ----------------------------------------------------------•---------------------------------------------------------- 5/4/92 6:05:52 PM File: FontMgr.a,47 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1029119 > Release notes for this change: Color fonts no longer work under Cube-E. This happened because the new code for the Fonts folder that accumulates all the font resources for a given ID happened to search for a style match with a word compare. However, the high byte of the style word is used for colour information, and the requesting routine does not explicitly ask for colour. So when something calls FMSwapFont for a font that happens to have color, the routine GetBestFONDForSizeAndStyle never finds an exact match because the style word in the FOND resource contains a color byte whereas the style word that was passed to FMSwapFont did not. The change was to only compare against the low byte of the style word, ignoring the color information. > What was tested: Color fonts draw properly with the change. Before, they would always show up as Helvetica. (Why Helvetica? I dunno…) ----------------------------------------------------------•---------------------------------------------------------- 5/8/92 2:00:12 PM File: FontFolderPatches.a,14 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1029253 > Release notes for this change: Because the fonts in the Fonts folder stay open, there are more open files when the Finder launches in Cube-E than there were in 7.0, or 7.0.1. If you have just enough font files in the Fonts folder, extra volumes fail to mount because there are not enough FCBs left to open the catalog and extents files for those volumes. Changed the code that opens the fonts in the fonts folder to expand the FCB list after the fonts have been opened so that there will be as many free FCBs after fonts have been open as there were before. > What was tested: The MacsBug “file” dcmd reports how many files are open, how many FCBs are allocated, how many are used, and how many are free. Compared the number of free FCBs from before the fonts were opened to the number of free FCBs after fonts were opened. There were less, of course. Then compared the number of free FCBs after the FCB list was expanded to the number free before fonts were opened, and the numbers match. ----------------------------------------------------------•---------------------------------------------------------- 6/2/92 6:50:15 PM File: FontMgr.a,48 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1030818 > Release notes for this change: A bad branch instruction wound up treating essentially all TrueType fonts as double byte fonts, except for Roman. This broke Arabic and Hebrew TrueType fonts, since they are not double byte fonts. When using an ‘sfnt’ resource to draw text, the Font Manager first calls fs_LowestPPEM which returns the smallest point size that TrueType should be used for. If the size to be drawn is smaller than this size, the Font Manager goes back and tries to find a bit map of that size. What was happening was that fs_LowestPPEM goes through some contortions to get this information for a double byte TrueType font. One thing it requires is a fragment table, which is set up by WorldScript II. If WorldScript II is not installed, this table is not allocated, and fs_LowestPPEM bails, returning garbage for the smallest point size, in this case, $2702. Since we’re trying to draw a 12 point Hebrew character, and 12 is smaller than 9986, it doesn’t use the TrueType font. If the TrueType font was the only size available for the desired font family, the application font is subsituted. Just think. All of this happens because the code was branching on greater than or equal to Korean, instead of just equal to Korean. > What was tested: The easiest test is to have a Hebrew/Arabic suitcase with only TrueType in it. Drop this into the Fonts folder, and open KeyCaps. Pick this font from the menu. The application font will be used instead of the right font. By changing the branch, the TrueType font is used as it should be. ----------------------------------------------------------•---------------------------------------------------------- 6/3/92 7:33:56 PM File: FontMgr.a,49 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1031058 > Release notes for this change: Normally, the font association table in a ‘FOND’ resource is structured such that for a given point size, the entry for the plain font comes before the entries for any stylistic variations. The candidate caching code saves information about the fonts in the font family, keeping a record of the plain font, and a record for all the styles. It assumes that the font assocation table followed the normal ordering. Of course, we’re talking about Macintosh developers here, who are a breed apart and there’s always ONE person that doesn’t follow the standard. Add a check so that if one of these screwy ‘FOND’s is encountered, the record for the styles is split across the record for the plain entry. What I’m saying is that the cache entries used to look like: [Info for plain][Info for styles]. For a screwy ‘FOND’, it will look like: [Info for styles][Info for plain][Info for more styles]. > What was tested: The Japanese version of the EZVision application (which is some music program) has one of these backwards ‘FOND’ resources. Without the change, the application font is ultimately subsituted for their font. With their change, their font is used. Additional checks were made via the Views control panel to make sure that this change did not affect standard ‘FOND’s, most notable, the italic Geneva used for alias file names. ----------------------------------------------------------•---------------------------------------------------------- 6/5/92 9:06:54 PM File: FontMgr.a,50 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1031450 > Release notes for this change: RealFont should return false if a bitmap size isn’t available, and the requested size is lower than the lowest size TrueType will be used for, as returned by the fsLowestPPEM function. Added code which checks this lower limit when a TrueType font is found. > What was tested: RealFont used to always return true, so if you use MacDraw II, or MacDraw Pro, and add 1 through 7 to the Size menu, they would all be outlined. However, most TrueType fonts have a lowestPPEM of 9, and the rest of a lowestPPEM of 6, so 1 through 5 should never be outlined. This is the case with this change. Also looked at several fonts that do not have TrueType versions to make sure that only those sizes were outlined. ----------------------------------------------------------•---------------------------------------------------------- 6/8/92 9:45:07 PM File: DrawText.a,75 Owner: Shannon A. Holland Project: MainProj∫QuickDraw∫ File: QDciPatchROM.a,132 Owner: Shannon A. Holland Project: MainProj∫QuickDraw∫Patches∫ File: QuickDrawPatches.a,21 Owner: Shannon A. Holland Project: MainProj∫QuickDraw∫Patches∫ File: Patterns.a,14 Owner: Shannon A. Holland Project: MainProj∫QuickDraw∫ File: QDUtil.a,21 Owner: Shannon A. Holland Project: MainProj∫QuickDraw∫ File: ScaleBlt.a,7 Owner: Shannon A. Holland Project: MainProj∫QuickDraw∫ File: Stretch.a,64 Owner: Shannon A. Holland Project: MainProj∫QuickDraw∫ File: FontMgr.a,51 Owner: Shannon A. Holland Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1031825 > Release notes for this change: Sped up drawing to 16 and 32 bit screens by putting these through the appropriate ScaleBlt cases (a 16 bit ScaleBlt loop was added for this purpose). Also added a special case loop for 1->16 and 1->32 (from Sean Callahan) in ScaleBlt as well as a general indexed->indexed loop. Changed the meaning of multColor to be a bitfield where bit 0 means the source is black and white only. This allows us to take fast colorizing cases for text. MakeScaleTbl was changed so that when colorizing it checks if it needs to to invert the background color and does so appropriately. Changed the Font manager so that it no longer marks synthetic fonts created with an arithmetic transfer mode as color fonts. > What was tested: Checked colorized text drawing to all bit depths for II and IIci ROMs. Checked srcCopy and notSrcCopy CopyBits cases for indexed->indexed and indexed->direct for II and IIci ROMs (along with clipping and alignment cases). Tested inversion of background colour to 1 bit destinations when fg and bg colours are different but map to the same index. ----------------------------------------------------------•---------------------------------------------------------- 6/12/92 2:17:05 PM File: FontMgr.a,52 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1032393 > Release notes for this change: RealFont needs to set the current resource map before calling LoadSplineFontResource to gaurantee that the ‘snft’ resource will always be successfully loaded. The ‘sfnt’ needs to be loaded to keep the fragment table code inside of fsLowestPPEM happy when EvenBetterBusError is installed. When getting a ‘FOND’ out of the candidate list, set CurMap to be the file that the ‘FOND’ came from for the duration of the call to LoadSplineFontResource. > What was tested: This bug occurs when RealFont is trying to determine if a TrueType font can be used for a particular point size, but the file that the TrueType font comes from is above the current resource map in the resource chain. This situation causes LoadSplineFontResource to fail and pass NIL to fsLowestPPEM which doesn’t handle NILs very well. With EvenBetterBusError is installed, the routine GetSplineDirectory will crash with a bus error as it dereferences what it thinks is a handle to a TrueType font. This crash no longer occurs with this fix. ----------------------------------------------------------•---------------------------------------------------------- 6/22/92 8:01:48 PM File: Bass Owner: John Harvey Project: MainProj∫Toolbox∫FontMgr∫ File: DoubleByteSupport.a,2 Owner: John Harvey Project: MainProj∫Toolbox∫FontMgr∫ File: MacExtra.c,13 Owner: John Harvey Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1033107 > Release notes for this change: International TrueType fonts (i.e. fonts with a cmap whose specific ID != smRoman) were not working at all. A long time ago I made a change in Bass_Cache.c that was supposed to first search for the cmap with the real script ID and if that failed try to find a cmap with 0 as its specific ID. Unfortunately, that was not all there was to the problem. When Gidi tried a a Hebrew font with a cmap 5 table. The font didn’t work at all. That was because a routine called GetEncodingTable which bassCache.c was calling to get the scriptID always returned 0 if the font wasn’t a CJK font. So GetEncodingTable was fixed to return the correct script ID for all fonts. In addition, since bassCache didn’t really want an encodingtable a changed the call to GetEncodingTable to a call to the script manager routine Font2RealScript. Finally, in MacExtra.c a routine called Map256Chars still calls GetEncodingTable and then calls GetFontMapIndex to get the index to the correct cmap. This routine was changed to first call GetFontMapInfo with the scriptID returned by GetEncodingTable. If that fails and the scriptID is not Roman we try again with smRoman has the script ID. That is to allow for old cmap 0 Arabic and Hebrew fonts. > What was tested: Tested with cmap 0 and cmap 5 hebrew fonts. They both worked. ----------------------------------------------------------•---------------------------------------------------------- 6/23/92 11:40:14 AM File: FontMgr.a,53 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1031450 > Release notes for this change: The previous change to RealFont added a call to fs_LowestPPEM to determine if TrueType can be used for a particular point size. The point size is kept in register D2, but D2 can be trashed by Toolbox calls. Like fs_LowestPPEM. Save and restore D2 around the call to fs_LowestPPEM. > What was tested: The previous change to RealFont was made so that RealFont would return false for point sizes that do not have a bit map, and is smaller than the smallest point size that the TrueType version would be used for. For Roman fonts, fs_LowestPPEM happens to not trash D2 so everything worked. For double byte TrueType fonts, D2 is trashed, so RealFont winds up thinking that every point size is available. For example, with Japanese as a primary script, MacWrite II would think that 7 point Hon Mincho was a valid point size, and would outline the 7 in it’s Size menu. 7 should not be outlined because the Hon Mincho suitcase does not have a 7 point size, and the smallest size that TrueType Hon Mincho will be used for is 25 point. By saving and restoring D2 around the call to fs_LowestPPEM, RealFont now returns the correct result for double byte fonts. In the MacWrite II example, the 7 in the Size menu is not outlined. ----------------------------------------------------------•---------------------------------------------------------- 6/23/92 10:31:58 PM File: FontMgr.a,54 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1031203 > Release notes for this change: Suitcase has a patch on GetResource which makes the Resource Manager search from the top of the resource chain for resources if Suitcase is the current resource map. In GetCandidateFONDs, the assumption is made that a resource will always be lower in the resource chain than the current resource map. Suitcase’s patch breaks this assumption. Add a check to see if the end of the resource chain is reached before the font resource is found. (This used to be in there, but I took it out, since I assumed that if I found the resource, it had to be below the current map in the chain.) > What was tested: Suitcase tended to bus error during boot because of this bug when it’s trying to show it’s icon, because _InitGraf will try to load Chicago. With this fix, the machine will successfully boot. ----------------------------------------------------------•---------------------------------------------------------- 6/28/92 3:34:14 PM File: Sys.r,320 Owner: Dean Yu Project: MainProj∫Make∫ File: FontFolderPatches.a,17 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1033906 > Release notes for this change: Althought the Fonts folder code only supports 128 font files in the Fonts folder, the Finder allows more files to be placed in the folder. The Finder will display an alert in this condition warning the user that some fonts will not be available, but the user is not warned that this condition will persist after the machine is restarted. The code that opens font files at startup time has been modified to display a notification telling the user that some fonts will not be available if more than 128 font files are in the Fonts folder. > What was tested: Since I didn’t have 128 font files handy, I reduced the maximum number of font files down to 10 to make sure that the alert is displayed when the maximum number is exceeded. I also verified that the alert is not displayed when fewer than the maximum number of suitcases are in the Fonts folder. ----------------------------------------------------------•---------------------------------------------------------- 6/29/92 7:05:25 PM File: FontMgr.a,55 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1031203 > Release notes for this change: Dean is a bonehead. The last change to this file, version 54, tried to prevent a crash caused by hitting the end of the resource chain before the resource map containing the ‘FOND’ resource was found. Unfortunately, in this change, I forgot to loop back if the end of the resource chain wasn’t reached. Add this branch. > What was tested: The symptom of Dean’s stupidity is that if you’re installing over b8, when the Installer is installing the fonts, the progress text will appear in the font that’s being installed instead of the system font. This is because it uses the first resource map it finds because it’s not looping to find the correct one, and our fonts happen to be numbered the same. With this change, the progress text is back to displaying in the system font when fonts are being installed. ----------------------------------------------------------•---------------------------------------------------------- 6/30/92 1:12:22 PM File: FontMgr.a,56 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1034346 > Release notes for this change: In GetCandidateFONDs, if the font number passed in is applFont, get the application font number out of ApFontID. This way, people calling RealFont with the application font will work correctly. > What was tested: OnCue II calls RealFont(applFont, …). The Font Manager then tries to get a ‘FOND’ resource of ID 1, which doesn’t exist, so it winds up subsituting in Chicago, and things look ugly. With the change, the Font Manager switches in the value in ApFontID if it determines that the font number it was passed was the generic application font ID. With this change, OnCue II’s Standard File replacement comes up in Geneva 9, like it’s supposed to. ----------------------------------------------------------•---------------------------------------------------------- 7/2/92 7:27:44 PM File: FontMgr.a,57 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1034530 > Release notes for this change: The Font Manager holds width tables for the fonts it uses. These tables are kept in purgeable handles in the system heap. When the Font Manager needs a width table that has been purged, it reallocates the memory, then builds it again. The memory is allocated using the ReallocHandle routine. Like the rest of the memory manager, it sucks, and allocates the memory out of the current heap, instead of the system heap. If the heap that the width table was allocated in goes away, the next time the Font Manager needs to use that width table, it will crash. Set the heap to be the system heap for this call to ReallocHandle, then restore it to the current heap. > What was tested: The Translation Manager creates a sub-zone in the system zone for the translators, which might be leaky. Some translators may call GetFontInfo to determine how to lay out the text in a document. This may cause a width table to be reallocated in the translator sub-heap. This heap is only around for the duration of the translation. Once this heap goes away, the Font Manager has an invalid handle for the width table, and will crash. By forcing ReallocHandle to allocate the memory from the system heap, this crash can never occur. ----------------------------------------------------------•---------------------------------------------------------- 7/4/92 5:27:05 PM File: fontPrivate.a,26 Owner: Dean Yu Project: MainProj∫Internal∫Asm∫ File: BassPatches.a,17 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ File: PartialFontExtensions.c,7 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫PartialFont∫Source∫ Radar bug: #1034875 > Release notes for this change: The partial TrueType code in Cube-E assumes that the partial font zone is always present. This is not the case in the base system. If this code ever executes, it will dereference nil, and if EvenBetterBusError is installed, crash. Normally this code doesn’t execute, since Roman ‘sfnt’ resources will be able to load into memory successfully, and the partial font code is not executed. However, in low memory situations, if the ‘sfnt’ fails to load, the partial font code will kick in and do strange things because there is no partial font zone. To get around this, create a small, 5K partial font zone for the base system for these low memory situations. This also provides a degredation case. > What was tested: Excel would crash with a bus error in the partial font code if the partial font zone does not exist. With this change, Excel does not crash. Since WorldScript II creates a partial font zone as well, I added a check to see if a partial font zone already exists. If it does, and the existing zone is smaller than the requested zone size, the existing zone is destroyed and a new one created. I verified that the base system’s 5K zone is replaced by WorldScript II’s 150K zone when that script extension is installed. ----------------------------------------------------------•---------------------------------------------------------- 7/8/92 6:54:14 PM File: FontMgr.a,58 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1035322 > Release notes for this change: GetBestFONDForSizeAndStyle searches all the ‘FOND’ resources for the requested font family for an exact match for the requested size and style. While it’s doing this search, it remembers other sizes and styles that can be used as alternates in case it doesn’t find the exact match. If this routine finds more than one ‘FOND’ that meets it’s criteria for alternates, it will use the most recent one it finds. The problem is that if an application wishes to override a particular font, this won’t work any more, since the application’s font will be the first one found. Add some code to GetBestFONDForSizeAndStyle to use the first ‘FOND’ that meets the alternate criteria. > What was tested: A good way of seeing this in action is to renumber Courier to be 3, which is Geneva’s family number, then paste the Courier ‘FOND’ and ‘sfnt’ into TeachText. Then convince TeachText to draw with 43 point fonts instead of 12 point. With Cube-E b9, TeachText will draw with 43 Geneva. With this fix, TeachText will draw with 43 point Courier (which the Font Manager thinks is Geneva because we changed the family ID). This is supposedly the right thing to do. ----------------------------------------------------------•---------------------------------------------------------- 7/11/92 7:43:53 PM File: FontMgr.a,59 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1035746 > Release notes for this change: The Font Manager marks ‘FOND’ resource non-purgeable as it is using them, and restores the previous handle state when it’s done. The new routine GetBestFONDForSizeAndStyle places a new ‘FOND’ resource in the LastFOND global without marking it non-purgeable. Since this is the ‘FOND’ that the Font Manager will be using, it is possible that the ‘FOND’ will be purged out from underneath FMSwapFont. Add code to GetBestFONDForSizeAndStyle to make the ‘FOND’ it places in LastFOND non-purgeable. > What was tested: John Connolly’s QuickDraw test tool no longer crashes with an illegal instruction with this fix. ----------------------------------------------------------•---------------------------------------------------------- 7/17/92 2:45:48 PM File: FontMgr.a,60 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1036422 > Release notes for this change: RealFont uses a dereferenced candidate list without locking it. Later on, it calls LoadSplineFontResource, which could move the candidate list. Lock the candidate list while RealFont is walking it. > What was tested: This is the bug that causes PageMaker to crash in MenuEnable now and then. This takes a long time to reproduce, so I didn’t test against this case (but I’m willing to bet quite a bit that it’s fixed). I did check to make sure that RealFont continues to work when it is called, and that I didn’t create a stack imbalance, or set the return value in the wronge place, etc. ----------------------------------------------------------•---------------------------------------------------------- 7/20/92 12:47:28 PM File: FontMgr.a,61 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1035869 > Release notes for this change: People who don’t follow the rules are boneheads. There are ‘FOND’ resources out there that have no font association table, which causes the Font Manager to barf. Added checks to GetCandidateFONDs and GetFONDForSizeAndStyle to bail early if there are no entries in the font association table. > What was tested: Mutilated a ‘FOND’ resource to not have a font assocation table. Without this fix, the System Heap gets trashed because the Font Manager writes off the end of what it thinks is a font association table. With this fix, the Font Manager eventually finds the font it wants by going through the ancient search by ‘FONT’ loop. ----------------------------------------------------------•---------------------------------------------------------- 7/21/92 6:45:10 PM File: FontMgr.a,62 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1036674 > Release notes for this change: I’m a bonehead. After restoring the zone after the call to ReallocHandle in FMSwapFont, the condition code from ReallocHandle gets blown away because writing to memory resets the condition code. Added a test of D0 to reset the condition code to be the same as it was when it returned from ReallocHandle so the following branch works. > What was tested: Added a debugger break after restoring the zone to ensure that the branch is only taken when the call to ReallocHandle fails. ----------------------------------------------------------•---------------------------------------------------------- 7/24/92 6:31:48 PM File: FontMgr.a,63 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1037497 > Release notes for this change: Styled fonts were not being drawn in their own typeface. This is because the new code which tries to match QuickDraw’s request wasn’t handling the case where QuickDraw thinks it’s a plain font, but the ‘FOND’ says that the font is styled. Added code to remember alternate candidates for this case. > What was tested: Garamond Condensed Italic was being drawn in Geneva because the ‘FOND’ says that the font is an italic font, but QuickDraw is drawing it as a plain font. With this change, this font draws in its own typeface. ----------------------------------------------------------•---------------------------------------------------------- 7/31/92 4:04:53 PM File: FontMgr.a,64 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1037497 > Release notes for this change: The last change had a bug which caused an infinite loop if QuickDraw wants a size that doesn’t exist, and there is no other style to fall back on. Add some code which knows how to get out of this case. > What was tested: MacWrite II would infinite loop if you try to use the Cyrillic fonts at a size that doesn’t exist. This fix fixes this problem. ----------------------------------------------------------•---------------------------------------------------------- 8/6/92 6:10:45 PM File: FontMgr.a,65 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1039067, 1039047 > Release notes for this change: This is another Dean is a bonehead bug. This happens only if you copy the application font into the destination suitcase, and the Finder updates some windows after the Mover progress dialog goes away. In the Font Manager, if a styled bitmap was being used as a QuickDraw plain face, GetFONDForSizeAndStyle would return the saved ‘FOND’ from the wrong register, and wind up nilling out the resource chain. Fixed for f5. > What was tested: This is the bug where the Finder restarts or crashes after moving fonts in the Fonts folder to a suitcase outside the Fonts folder. With this fix, everything works fine. ----------------------------------------------------------•---------------------------------------------------------- 8/7/92 1:15:16 PM File: FontMgr.a,66 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1039047 1039067 > Release notes for this change: The last change was done only for bitmapped fonts. It should have been done for TrueType fonts as well. Now, whenever a styled font of any type is being used as a plain face, the requested style is changed to be non-plain so that the code later on will pick up the ‘FOND’ with the correct font from the right register instead of using nil, which does odd things to the Resource Manager. > What was tested: This extra change was needed because a document using N Helvetica Narrow was crashing when it was being printed. (Don’t ask me how it ever showed up on the screen, though…) With this additional (one line) addition, this document can be printed. ----------------------------------------------------------•---------------------------------------------------------- 8/13/92 2:52:56 PM File: FontMgr.a,67 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1039692 > Release notes for this change: Dean’s still a bonehead. Let’s hope that the third time is a charm. The original problem was that the new Font Manager code to deal with the Fonts folder wasn’t handling the case when QuickDraw is requesting plain, but there is only a styled font available. The visible result of this was that styled fonts would show up in Geneva. Code was added to handle this case, but this code had a bug which caused the Font Manager to return the font from the wrong register, causing the resource chain to get trashed. This was the problem where the Finder restarted when copying suitcases from the Fonts folder to another suitcase. In fixing this problem, I made the Font Manager stop it’s search for an exact match too soon. It stopped when it found an alternate instead. The visible result of this bug was that Finder windows were refreshed in Geneva italic. This is the problem that this change is fixing. > What was tested: I’m getting really tired of working on this code. Brian and I drew a huge flow chart of how the Font Manager is supposed to pick a font. Then we went through the code to make sure that it’s doing it this way. Once we were satisfied that everything was working correctly, we ran the new system and made sure that styled fonts showed up properly. (We tried Swing and Zeal.) Then we made sure that copying fonts out of the Fonts folder into another suitcase doesn’t crash. Then we made sure that when the Finder windows get updated properly. Everything finally seems to work! ----------------------------------------------------------•---------------------------------------------------------- 8/17/92 6:29:23 PM File: FontMgr.a,68 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ Radar bug: #1039825 > Release notes for this change: The alternate font code should keep looking for an exact match instead of leaving and trying to use a font. This causes a bus error if two alternates were found before an exact match was found because GetFONDForSizeAndStyle would leave, trying to use the exact match, which wasn’t found. Change the code to look for an exact match instead of bailing early. > What was tested: When the user seperates a suitcase with plain and multiple styles, and puts these all into the Fonts folder, the machine will crash with a bus error any time the plain font is used. (Bookman is what I used.) With this change, the machine won’t crash. ----------------------------------------------------------•---------------------------------------------------------- 9/2/92 12:05:18 PM File: fontPrivate.a,29 Owner: Dean Yu Project: MainProj∫Internal∫Asm∫ File: FontMgr.a,70 Owner: Dean Yu Project: MainProj∫Toolbox∫FontMgr∫ File: ResourceMgrExtensions.a,61 Owner: Dean Yu Project: MainProj∫Toolbox∫ResourceMgr∫ Radar bug: > Release notes for this change: Converting some equates into record structures. > What was tested: No object change. ----------------------------------------------------------•----------------------------------------------------------