mirror of
https://github.com/dmolony/DiskBrowser.git
synced 2025-01-18 03:30:18 +00:00
add load address to font files
This commit is contained in:
parent
8e52f549a0
commit
314d86e36e
@ -23,9 +23,10 @@ public class FontFile extends AbstractFile
|
||||
|
||||
List<Character> characters = new ArrayList<Character> ();
|
||||
|
||||
public FontFile (String name, byte[] buffer)
|
||||
public FontFile (String name, byte[] buffer, int address)
|
||||
{
|
||||
super (name, buffer);
|
||||
loadAddress = address;
|
||||
|
||||
image = new BufferedImage ( //
|
||||
dimension (charsX, borderX, sizeX, gapX), //
|
||||
@ -37,7 +38,7 @@ public class FontFile extends AbstractFile
|
||||
|
||||
if (false) // show gaps around the glyphs
|
||||
{
|
||||
g2d.setColor (new Color (245, 245, 245));
|
||||
g2d.setColor (new Color (245, 245, 245)); // match background
|
||||
g2d.fillRect (0, 0, image.getWidth (), image.getHeight ());
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ abstract class AbstractCatalogEntry implements AppleFileSource
|
||||
if ((name.endsWith (".FONT") || name.endsWith (" FONT")
|
||||
|| name.endsWith (".SET") || name.startsWith ("ASCII."))
|
||||
&& FontFile.isFont (exactBuffer))
|
||||
appleFile = new FontFile (name, exactBuffer);
|
||||
appleFile = new FontFile (name, exactBuffer, loadAddress);
|
||||
else if (ShapeTable.isShapeTable (exactBuffer))
|
||||
appleFile = new ShapeTable (name, exactBuffer);
|
||||
else if (name.endsWith (".S"))
|
||||
|
@ -249,9 +249,9 @@ class FileEntry extends CatalogEntry implements ProdosConstants
|
||||
// I made up aux=99 to test it without stepping on aux==04
|
||||
file = new SHRPictureFile2 (name, exactBuffer, 0xC0, 99, endOfFile);
|
||||
else if (name.endsWith (".FNT") && FontFile.isFont (exactBuffer))
|
||||
file = new FontFile (name, exactBuffer);
|
||||
file = new FontFile (name, exactBuffer, auxType);
|
||||
else if (name.endsWith (".FONT") && FontFile.isFont (exactBuffer))
|
||||
file = new FontFile (name, exactBuffer);
|
||||
file = new FontFile (name, exactBuffer, auxType);
|
||||
else if (ShapeTable.isShapeTable (exactBuffer))
|
||||
file = new ShapeTable (name, exactBuffer);
|
||||
else if (link != null)
|
||||
@ -386,7 +386,7 @@ class FileEntry extends CatalogEntry implements ProdosConstants
|
||||
break;
|
||||
|
||||
case FILE_TYPE_FNT:
|
||||
file = new FontFile (name, exactBuffer);
|
||||
file = new FontFile (name, exactBuffer, auxType);
|
||||
break;
|
||||
|
||||
case FILE_TYPE_FONT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user