Using cycles, how would I go about making text that is UV mapped onto a surface (in this case a book cover) have a gloss while the remaining part of the image stays matte? The text needs a kind of foil finish with the white being matte paper. Can the mesh be selected with the image, or is there a better way?
The general principle is to use an image processing package (like GIMP) to separate your image into two component images. One image will contain the black text, with the background being changed so that it is transparent. I would make the other image, containing the background, all with the background color with no transparency. The two images would be applied to the material using two separate nodes, one for each image, with a shader in each node tree. The text, which is to be glossy would have the settings for its shader that cause the text to render glossy; the shader for the background would have the settings for a shader that renders a matte finish. When the two images are stacked exactly on top of each other, the image will exactly mimic the reference image, with matte background and glossy text.
Without more information about your model, lighting, &c., I am not able to provide any further detail on the settings you should use. While you specify using cycles, the same principle should apply in using the Blender internal materials and textures; split the image, into two, use the text image with a glossy material, and the background with a matte one, and stack the first material on the second.