What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Help with Web Style Documents


MrOMG

New Member
Messages
2
Likes
0
Hello there, I basically make web designs at work which need to be split up into files and need style documents for the web stylists to use, which I can do but it seems like a lengthy process. The problem however is when I go to make a style document for the web stylists I am doing all the measurements manually, this seems to take up a lot of time. Is there any one who knows a way to make a web style document quickly, and by this I mean not having to do all the measurements in the design manually for each layer.

These pictures illustrate what I've been doing so far, it would be helpful to also find a way of getting all the information about a text layer in one click of a button, like font, colour, size etc.

Each jpeg would be for a specific purpose when the stylists look at my designs. One would be to label the measurements for the layout of the design, one would be for labeling text information on the design, and one for labelling where the split up files for the design are to be used within the design. But really I want to make all of these documents quicker to make, overall a page like this can take me up to an hour or more, which seems too long.

Thanks for your time,

James.

015 - Basket Page [Measurement Labels].png000 - Basket Page [Text Labels].png000 - Basket Page [File Labels].png
 

Paul MR

The Script Master
Messages
382
Likes
206
This script might help with getting a text layer details.
Just select a text layer and run the script, I have put the output in editboxes so that you can copy and paste if required...

Code:
#target photoshop
main();
function main(){
if(!documents.length) return;
if(activeDocument.activeLayer.kind != LayerKind.TEXT) return;
var TxtLayer = activeDocument.activeLayer;
var Colour = TxtLayer.textItem.color;
var Font = TxtLayer.textItem.font;
var TXTsize = TxtLayer.textItem.size;
var win = new Window( 'dialog','Text Details');
win.p1= win.add("panel", undefined, undefined, {borderStyle:"black"}); 
win.g10 = win.p1.add('group');
win.g10.orientation = "row";
win.g10.alignment='left';
win.g10.st1 = win.g10.add('statictext',undefined,'Text Colour');
win.g10.st1.preferredSize=[100,20];
win.g10.et1 = win.g10.add('edittext');
win.g10.et1.preferredSize=[100,20];
win.g10.et1.text= "#"+ Colour.rgb.hexValue;
win.g20 = win.p1.add('group');
win.g20.orientation = "row";
win.g20.alignment='left';
win.g20.st1 = win.g20.add('statictext',undefined,'Font Name');
win.g20.st1.preferredSize=[100,20];
win.g20.et1 = win.g20.add('edittext');
win.g20.et1.preferredSize=[230,20];
win.g20.et1.text=app.fonts[Font].name;
win.g30 = win.p1.add('group');
win.g30.orientation = "row";
win.g30.alignment='left';
win.g30.st1 = win.g30.add('statictext',undefined,'Font Size');
win.g30.st1.preferredSize=[100,20];
win.g30.et1 = win.g30.add('edittext');
win.g30.et1.preferredSize=[100,20];
win.g30.et1.text=Number(TXTsize).toFixed(2);
win.g40 = win.p1.add('group');
win.g40.orientation = "row";
win.g40.alignment='left';
win.g40.st1 = win.g40.add('statictext',undefined,'Pixel Size W x H');
win.g40.st1.preferredSize=[100,20];
win.g40.et1 = win.g40.add('edittext');
win.g40.et1.preferredSize=[100,20];
var startRulerUnits = app.preferences.rulerUnits;
app.preferences.rulerUnits = Units.PIXELS;
var LB=TxtLayer.bounds;
var Width = LB[2].value - LB[0].value;
var Height = LB[3].value - LB[1].value;
app.preferences.rulerUnits = startRulerUnits;
win.g40.et1.text=Width + " x " + Height;
win.g300 = win.p1.add('group');
win.g300.orientation = "column";
win.g30.alignment='fill';
win.g300.bu1 = win.g300.add('button',undefined,'Done');
win.g300.bu1.preferredSize=[350,30];
win.g300.bu1.onClick=function(){
    win.close(0);
    }
win.center();
win.show();
}
 

MrOMG

New Member
Messages
2
Likes
0
Thanks very much Paul, I tried this script and it will certainly save me some time on the text information front.

Brilliant stuff : )
 

Top