Copying a font

I'm trying to copy a standard font file through java and have hit a strange problem. Using the Mac finder I can select a font and move it wherever I want but programatically it fails every time.
I've tried several file copy techniques and have had no luck, the font file will be created in the destination but the size is never correct (thus corrupting the font). A friend has mentioned that all kinds of weird characters can exist in font files including EOF in random spots and I'm thinking this might somehow be related to the problem. Code is below (and common, probably found it here) but is there any other way to ensure a byte for byte copy of any file despite it's contents (assuming that's what's going on)?
        FileChannel in = new FileInputStream(src).getChannel();
        FileChannel out = new FileOutputStream(dst).getChannel();
        in.transferTo(0, in.size(), out);
        in.close();
        out.close();

From the Javadoc for java.nio.channels.FileChannel.transferTo(), i.e. the first place you should look:
An invocation of this method may or may not transfer all of the requested bytes
Cater for that possibility.

Similar Messages

  • How can I copy a Font Book library with "Collections" to my 2nd laptop?

    How can I copy a Font Book library with "Collections" to my 2nd laptop?
    I have a number of fonts (approx. 500) on my work laptop which are sorted to different Collections. I'd like to have a copy of the Font Book library with Collections on the laptop I use at home to work. I'd think there was a more straight forward way to do it, but I haven't found any posts regarding the matter so any help would be appreciated.
    Thanks

    To anyone who is reading this based on needing to copy their Font Book to another machine as I do, there is a way to make a copy of the fonts in Font Book by going to file/export fonts. Keep in mind that you will need to have all the fonts selected (command A) in your "All Fonts" list for them to be exported. You will then have a new folder saved to where ever you chose, with all your Font Book fonts in it.

  • "cannot copy necessary font(s)"

    Using latest version of InDesign (9.1) and Mavericks OSX and get "cannot copy necessary font(s)" error message everytime I try and package. I've repaired disk permissions, unlocked all fonts in my doc, added all the document fonts to InDesign fonts folder, everything I've seen suggested...to no avail. I've spent almost two days trying to troubleshoot and up against a print deadline. Help?!

    I'm using various weights of Gotham and MuseoSlab...that's it. I'm not sure about a patch but I've updated to the most recent version on InDesign CC. I've even tried converting all of my fonts to outlines and I'm still getting the error message.

  • InDesign CC won't package due to "Cannot copy necessary font(s)" error.

    Every time I try to package out a file in InDesign its gets about 3/4s of the way through and then shows the "Cannot copy necessary font(s)" dialog box. I have read on certain discussions it may be a font issue. When I remove ALL fonts from my computer font library and use only preset Adobe fonts, Arial Regular for example, it works fine, then as soon as I use a font say, Helvetica Neue Light, I get the error. I have only recently upgraded to CC and all of the existing fonts in my library have always worked fine and never been a problem when packaging... However due to the tests with different fonts, it seems to be a font issue and not a links/filename issue like other people have had.

    I am experiencing the exact same problem/same error message as Brendan. I just installed InDesign CC; was using CS5 prior, and WAS having NO issues with the same fonts being packaged (all Myriad Pro family). In the Package dialog box > Fonts section; this is displayed: "8 Fonts Used, 0 Missing, 0 Embedded, 0 Incomplete, 0 Protected." The Show Problems Only checkbox IS checked, no problems flagged, no errors in the Preflight panel either. On the "More Info" panel within the "Find Font" menu, every one of the fonts used has "Restrictions: Normal".  Packaging with the "Report" button option selected is not helpful, (you'll get a text file with YourJob_report.txt, showing no font errors) InDesign stops packaging but creates a job Folder containing a "Document Fonts" folder with only a tmp file inside. Extract that and read it in a Text Editor. Here's what I found:
    "Copyright © 2000 Adobe Systems Incorporated. All Rights Reserved. U.S. Patent Des. pending.Myriad ProBlack Condensed1.006;ADBE;MyriadPro-BlackCondMyriad Pro Black CondensedOTF 1.006;PS 001.000;Core 1.0.23;hotunix 1.28MyriadPro-BlackCondMyriad is a registered trademark of Adobe Systems Incorporated.Robert Slimbach and Carol Twomblyhttp://www.adobe.com/typehttp://www.adobe.com/type/legal.htmlMyriad Pro Black CondCopyright © 2000 Adobe Systems Incorporated. All Rights Reserved. U.S. Patent Des. pending.Myriad Pro Black CondBold1.006;ADBE;MyriadPro-BlackCondMyriadPro-BlackCondOTF 1.006;PS 001.000;Core 1.0.23;hotunix 1.28Myriad is a registered trademark of Adobe Systems Incorporated.Robert Slimbach and Carol Twomblyhttp://www.adobe.com/typehttp://www.adobe.com/type/legal.htmlMyriad ProBlack Condensed"
    It seems MyriadPro Black Condensed MAY be the culprit in my case.
    By the way, isn't it a bit redundant to manually create a "Document Fonts" folder, drag / copy all the fonts used in my file into that folder, THEN to try and "package" them— again?! What ? Isn't that the whole point of the feature, to perform that exact task?

  • Unable to copy the font testgenrg.otf to the Fonts Folder??

    I have a iMac desktop running Mac OS X 10.6.8 with Intel Core 2 Duo processor.  I have started to get two errors messages.  The first says "Unable to copy the font testgenrg.otf to the Fonts Folder.  Please copy this from your Program folder to your System Fonts folder".
    The second says "The following fonts have not been installed properly  "TestGen Regular".  Please copy them to you System fonts folder".
    I have searched my system and I don't see that I have that file anywhere on my system.  Can anyone tell me where it might be located and where it is supposed to be located and how to fix this issue?  I don't really see any impact to my use of my iMac but the messages keep popping ups.  Thank you.

    I have not tried to install anything.  Do I need to go back to my installation disk and pull it off there?  I have looked for it on the HD but it is no where to be found.  I will check to see if I can double click on the name of the file in the error message but I didn't see that as a possibility.  Thanks.

  • InDesign CS 6 Package - " Cannot copy necessary font(s)"

    Hi,
    I've recently installed InDesign CS 6 on my Mac. Everything works fine until I start to package my files. I'll get the above error message and nothing will be copied out. I've been browsing the forum and saw that a few others also experienced similar problems. I've tried some of the methods (Re-installing InDesign & Trashing my preference) but none works. I've an older version of Indesign CS 5.5 and the same document file package out fine. I'm running on OS X 10.6.8 on a MacPro. The problem does not just lie in one file. All my other files are experiencing the same problems with packaging on CS 6. And I'm only using 1-2 font type (Univers).
    Would greatly appreciate if anyone could give me some directions on this. Thanks!
    Cheers,
    Jeffrey

    I see this was posted almost a year ago.  Did you ever find any resolution?  I am now having this problem suddenly.

  • Copying OS9 fonts to OSx

    Sorry if this isn't the right place -- yes, I'm a newbie here.
    Is it possible to copy fonts that we had available on my old machine (OS9) to my new Mac Mini (OSX)?
    If so, How?
    Thanks.

    Can it be as simple as copying the old font files to the /library/Fonts directory on the new Mac!?!
    If so, that's great!! I can then retain my investment (as much as possible) and keep on using the fonts that I've always used (without having to re-purchase or find similar ones).
    Moving the files between systems is not a problem as I already have a network between the two computers (and yes I could burn a CD if the wire broke).
    My concern/question regards the steps or procedures for exporting/packaging the fonts on the OS9 G3 then importing them in to the OSX mini.
    Mac Mini Mac OS X (10.4.6)

  • A way to copy the fonts?

    The reason I ask this is because I'm doing some print work that uses a few fonts. All mac system fonts.
    I should include these with the cd for the printshop... however is this even necessary since, i'm assuming, that windows and osx both have these standard fonts.
    the fonts are Book Antiqua, and monotype corsiva.

    This thread may be of use..
    http://forums.adobe.com/message/2191661#2191661

  • Tamil font cant copy to FCP 6 text

    I have this problem. Whenever i copy Tamil font from outside to FCP text box, the fcp wont recongnise and show me alien font. However, when i type inside the fcp text box, it works fine.
    Its works fine in OS 10.4.11 and FCP 5.1.4.
    May i know how can i overcome this problem?

    apart from copy / pasting the text, are you choosing the font from the font list?
    and have you tried using Boris Title 3D instead ? (it has better font support and text rendering)

  • Fonts copy to new HD and OS

    How do I copy over Fonts only to a new HD with a OS on it. Which folder to I copy.

    The System folder is not a good place to put fonts you add to the hard drive. It's not that they won't work there, but it's a pain to use that folder. You'd have to enter your admin password both to put fonts in the /System/Library/Fonts/ folder, and to delete them, since you can't just drag fonts out of that folder. Font Book, and pretty much any other font manager also won't let you disable fonts the System folder.
    The best place to put fonts you add is the /Library/Fonts/ folder. In that location, any user can see and use the fonts. You can also put them in the Fonts folder of your account, but then only you can use them.

  • Copying font files

    Hello all. I'm trying to make a function that receives a string (layer.textItem.font) and tries to find and copy the font file to another directory (for example, for "MyriadPro-Regular", I'd copy "C:\Windows\Fonts\MyriadPro-Regular.otf").
    The problem is that it doesn't work always, because I can't get the font's filename. For example, if I have a text layer with "Arial" font, its postScriptName is "ArialMT", and I can't find the font file with that name. I have an "arial.ttf" but not an "arialMT.ttf".
    My question is: is there any method to get the font's filename, instead of textFont.name or textFont.postScriptName? I've searched in "Adobe JS Tools Guide" and didn't find anything :S
    Thanks very much beforehand.

    InDesign should see any fonts that are installed normally on your sytem for use by all programs (you don't mention your OS, so I don't know how you would normally install fonts). There are also two special private folders, one for all Adobe apps, and one for InDesign alone, and copying a font into either of those folders should also work. Is this perhaps a Type 1 font and you only have half of it? Or perhaps you are trying to install a Mac font on Windows? That would be apparent if the font size in Explorer is listed as 0 bytes.

  • ***FONT ISSUES: How do I create a font repository/server??? ***

    Before I explain my font problem, let me first say that I hope that SOMEONE out there/here has good knowledge of fonts, (storage/management/etc.) and can take the time to help me out with my problem. I'd be ETERNALLY grateful for a solution to this problem!! Let me also explain the workflow setup I am coming from. I work at a production company that has 3 edit suites, accessing media from a SAN, managed by FibreJet software. We are running Apple Mac Pro's with 2 x 3 GHz Dual-Core Intel Xeon chips, and 8 GB 667 MHz DDR2 FB-DIMM memory. The 3 stations can have READ access to any one drive on the SAN at the same time with no problem, but only one station at a time can have WRITE access to a drive. We each have our own fonts (~2500) on our local systems, and we are all using Extensis Suitcase Fusion 12.1.6 to manage our fonts.
    Over the past few months, a couple of projects have reminded us that we have to address a problem in the way we manage our fonts. A project was started in Edit 1 (E1). Footage was loaded, music added and graphics created all in E1. The graphics were made in the Title 3D generator. Near the end of the project, a change had to be made and the original editor and edit suite (E1) was unavailable, so another editor needed to make the change in E2. This is a workflow that we use all the time, and usually don't have a problem. However, this time, when the graphic change was made, either the font that was originally used was missing from E2, or it was not activated. In either case, FCP simply substituted another font in it's place. Unlike Photoshop, FCP does not give any warning when this happens, it just changes the font, so unless you are familiar with the project, you may not know that the change occurred.
    As I said, these problems have reminded us that we have to address a problem in the way we manage our fonts. One solution I have thought of would be to consolidate all our fonts onto one of our SAN media drives, and always read that drive. We would then add fonts from this drive, instead of adding from our individual local drives, and hopefully avoiding the "font-switch" problem in the future.
    Questions arise, such as: Will Extensis read a font from a SAN drive, or does it have to be local? Will there be a problem with the fact that the drive will be READ only, as opposed to having WRITE access, since all three of us cannot write to the same drive at the same time? Should we just use Apple's own FontBook, instead of Extensis Suitcase, or do we even look into something like Linotype's FontExplorer X, (which I stumbled upon during searches for solutions to our problem)?
    If anyone has any answers to my questions, or any solutions we haven't thought of, I'd be very grateful for your help!

    Will Extensis read a font from a SAN drive, or does it have to be local?
    Here's a bit of information on a SAN setup.
    Storage Area Network (SAN) is a high-speed subnetwork of shared storage devices. A storage device is a machine that contains nothing but a disk or disks for storing data. A SAN's architecture works in a way that makes all storage devices available to all servers on a LAN or WAN. As more storage devices are added to a SAN, they too will be accessible from any server in the larger network. In this case, the server merely acts as a pathway between the end user and the stored data.
    Because stored data does not reside directly on any of a network's servers, server power is utilized for business applications, and network capacity is released to the end user.
    So as I understand it, your Mac's will all see data on a SAN drive array the same as it would a drive that is part of any LAN or WAN. In other words, if activating fonts from a drive on a typical server works, then doing so from a SAN should work the same.
    That said, I've never had the opportunity to try it. The easiest way to find out would be to simply drag some fonts into Suitcase that you know are on the SAN storage and see if the activate as you would expect. An issue that may come up is that multiple users may not be able to activate the same fonts at the same time. That wouldn't specifically be a write issue since Suitcase doesn't need to perform a write when opening fonts (other than to update the font cache files on the local drive), but rather if the server considers the files "locked" (in use) to the first user to access them. All depends on how the server is set up, or how Suitcase handles fonts it currently has active. That is, will the server lock the files, or Suitcase, if either?
    One solution I have thought of would be to consolidate all our fonts onto one of our SAN media drives, and always read that drive. We would then add fonts from this drive, instead of adding from our individual local drives, and hopefully avoiding the "font-switch" problem in the future.
    That would be my first suggestion whether you can read simultaneously read the fonts from the SAN drive or not. I imagine each project is kept in its own folder. Within that, all fonts should be kept together in a single subfolder. An obvious name for that folder is good, such as "Fonts_jobnumber". If Suitcase and/or the server will allow all of you to access the same fonts at the same time, just activate them from the SAN. If not, copy the fonts to your local drive first and then activate.
    Should we just use Apple's own FontBook, instead of Extensis Suitcase, or do we even look into something like Linotype's FontExplorer X, (which I stumbled upon during searches for solutions to our problem)?
    Font Book is a very weak font manager. It's only advantage in a case like this is that every font you open gets copied to the local drive into one of the two Fonts folder you can designate in its preferences. Then you're always opening the fonts locally. The bad part is that when you use hundreds or thousands of fonts, they all get copied to your Mac as you add fonts. This increases startup times, sometimes dramatically as Font Book has to check all of those fonts during startup against its database to see which should be active and which not. The larger that database gets, the more likely it is to get corrupted.
    Suitcase is a far more elegant solution for heavy font usage since you can activate fonts in place. They don't need to be copied anywhere to use them. FontExplorer X can be set up to do the same thing. Depending on what features of Suitcase you use, you may still prefer it over FontExplorer X, even though the latter is free.

  • Font pointing to wrong location

    In my document text using Lucida Grande has dissapeared. Upon sleuthing using "Find Font" I've discovered that Lucida Grande is actually pointing to a different font: /Library/Fonts/Stone Sans OS ITC TT. The other font used - Lucida Grande Bold works fine, and using "Find Font" it points to the correct location of /System/Library/Fonts/LucidaGrande.ttc
    What is interesting is that the same problem appears on two different machines using two different versions of InDesign. The problem first appeard on my MacBook Pro using InDesign 5 but it also happens on my iMac using InDesign 5.5.
    I tired creating a new document on both machines, and the problem follows.
    How can I tell InDesign to point Lucida Grande to /System/Library/Fonts/LucidaGrande.ttc?
    I tried copying the font to the /Library/Fonts folder, but the Mac OS X complains about duplicate fonts.

    Hey there,
    Lucida Grande is a system font, and should not be moved from the System/Library/Fonts folder. Doing so may render your Mac unbootable. The reason you're getting the duplicate font issue is because Lucida Grande must be present and in use at startup, and copying it into one of the other Fonts folders essentially tries to activate it again. It's probably a good idea not to use Lucida Grande in your design work to avoid potential system problems when packaging/loading the font onto another system.
    Hope this helps,
    Cheers!
    -Mikey

  • How do I install PFB fonts when using Windows 7 64bit?

    I got a new 64 bit computer with Windows 7. But when I copied the fonts I was using on the old computer the PFB fonts do not work any longer.
    The old ATMF program does not work on this computer so how do I now install the PFB fonts?
    //Anni

    Hopefully you did not try to install the old Adobe Type Manager software. If you did, you may need to totally reload Windows if you cannot restore your system to its state prior to attempting to install that software!
    Assuming that you didn't make that fatal mistake, the method for installing Type 1 fonts, each of which consists of a .pfb and a .pfm file is as follows:
    (1)     Copy the .pfb and the .pfm  files to a single directory if they are not already so available.
    (2)     Select the .pfm files for the fonts you wish to install.
    (3)     Right-click and select Install which will then proceed to install the fonts onto your system copying both the .pfb and the .pfm files to the C:\Windows\Fonts directory. Do not drag-and-drop these files! Alternatively, if you don't want the font files themselves resident in the C:\Windows\Fonts directory, when you right-click the files, select Install as shortcut. This installs the font but references it from its current location.
              - Dov

  • On Windows 7, CS6 all products, but especially need help with ID.  Fonts that are showing in other applications are not showing in ID.

    on Windows 7, CS6 all products, but especially need help with ID.  Fonts that are showing in other applications are not showing in ID.

    The ID Program folder will be relevant to your OS...
    I took a shot and right clicked on my Scripts Samples, choose reveal in Explorer and opened up the ID Program folder.
    As shown, there is a Fonts folder.
    Drag/Copy/Paste fonts to this folder.

Maybe you are looking for

  • How to create schedule job and event trigger in XI to start a ABAP program?

    Dear All: Here are what i need to do: 1.To run a ABAP program to start an XI scenario per hour. 2.To run a ABAP program to start an XI scenario per day at 6 PM. 3.To run a ABAP program used event trigger to make sure that XI scenario has finished the

  • Error installing itunes on windows xp a network error occurred

    i have trouble installing iTunes 10.2.2 on WIndows XP computer. Everytime i get message that a network error occurred. What is the trouble here? Any help is appreciated!

  • Mac Mail is displaying strange characters

    My Mac Mail is displaying these strange characters on a number of seemingly random emails from people. However, when I copy the message and paste it into a word document or the internet browser address bar it converts these "letter A in a box" charac

  • Holding "C" Key during power up not working?

    I deleted adn backed up everyting. Everytime I restart my computer I try holding the "C" key so it can go to the installation window for MAC OS X Leopard. Instead the computer freezes there. Is there something I can do to fix this? Maybe press a diff

  • Empty entry in table of contents

    I have created a couple of table of contents recently and in every instance they added a blank entry at the end.  In most cases this is OK as I can either delete it or simply force the entry to be overset but I'd prefer it not be created at all.  Has