• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Text automatically turned from Pixels into Points?

Community Beginner ,
Nov 17, 2022 Nov 17, 2022

Copy link to clipboard

Copied

Hi there, I'm currently doing work related to comics, so the text must be uniform in point size. Everything was fine until 3 days ago, the text often automatically converted to pixels during use even though I didn't change the unit settings or open suspicious files. (I have updated photoshop to the latest version, but it was last week and still works normally. After this problem, I tried reverting to the original version but the result is still the same)

Even if I reset the unit in settings, or restart Photoshop, re-open files, change px to pt at type dialog, but the text would turned into pixels then. Sometime when I change from px to pt, the text size does not change, but the file resolution would be changed into 72 ppi, no matter what the original is. I think it's a bug or something. I couldn't find any result on google about this, so I hope to get the answer here.

Thanks everyone for the help.

TOPICS
Windows

Views

282

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 17, 2022 Nov 17, 2022

Copy link to clipboard

Copied

LATEST

Sorry to bother everyone, maybe I found out where the problem was, this is totally my fault. (If I have to create a new topic for this question, please notify me because I could not delete this one) It's because of my new script for auto-centering text at a bubble (created by Vaelis):

 

#target photoshop

function magicWand(x,y,t,a,c,s) {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putProperty( charIDToTypeID('Chnl'), charIDToTypeID('fsel') );
desc.putReference( charIDToTypeID('null'), ref );
var positionDesc = new ActionDescriptor();
positionDesc.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Rlt'), x );
positionDesc.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Rlt'), y );
desc.putObject( charIDToTypeID('T '), charIDToTypeID('Pnt '), positionDesc );
desc.putInteger( charIDToTypeID('Tlrn'), t);
desc.putBoolean( charIDToTypeID('Mrgd'), s );
if(!c) desc.putBoolean( charIDToTypeID( "Cntg" ), false );
desc.putBoolean( charIDToTypeID('AntA'), a );
executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );
};

function layerPixels2Selection() {
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putProperty( charIDToTypeID( "Chnl" ), charIDToTypeID( "fsel" ) );
desc.putReference( charIDToTypeID( "null" ), ref );
var ref1 = new ActionReference();
ref1.putEnumerated( charIDToTypeID( "Chnl" ), charIDToTypeID( "Chnl" ), charIDToTypeID( "Trsp" ) );
desc.putReference( charIDToTypeID( "T " ), ref1 );
executeAction( charIDToTypeID( "setd" ), desc, DialogModes.NO );
}

function duplifill() {
docRef.artLayers.add()
docRef.selection.fill( whiteColor, ColorBlendMode.VIVIDLIGHT,100, false)
}

function findPV(h) {
for (var i = 0; i <= 255; i++ ) {
if (h[i]) { return i; }
}
return 0;
}

function boundshape(xt1,yt1,xt2,yt2) {
var shapeRef = [[xt1,yt1],[xt1,yt2],[xt2,yt2],[xt2,yt1]]
docRef.selection.select(shapeRef)
docRef.selection.copy();
var id30 = charIDToTypeID( "CpTL" );
executeAction( id30, undefined, DialogModes.NO );
var tempBounds = docRef.activeLayer.bounds;
docRef.activeLayer.remove()
return tempBounds
}

function getlayercolor(xt3,yt3) {
var MyState0 = docRef.activeHistoryState;
docRef.flatten();
magicWand(xt3,yt3,0,false,true,true)
var maxred = findPV(docRef.channels["Red"].histogram);
var maxgreen = findPV(docRef.channels["Green"].histogram);
var maxblue = findPV(docRef.channels["Blue"].histogram);
docRef.activeHistoryState = MyState0;
return Math.min(maxred,maxgreen,maxblue)
}

function createbubblelayer(xt2,yt2) {
magicWand(xt2,yt2, 10 , false, true, true)
var selRef = docRef.selection
selRef.contract( 4 )
selRef.expand( 3 )
duplifill()
magicWand(xt2,yt2, 10 , false, true, false)
duplifill()
docRef.artLayers[1].remove()
docRef.activeLayer=docRef.artLayers[0]
}

function textlayerstate() {
var emptytext=false
layerPixels2Selection();
try {
docRef.selection.copy();
} catch(e) {
emptytext=true
}
return emptytext
}

function bubblebound(xt3,yt3) {
magicWand(xt3,yt3,10,false,true,true)
var selRef = docRef.selection
duplifill()
var tempBounds = docRef.activeLayer.bounds;
docRef.activeLayer.remove()
return tempBounds
}

function findareacenter(yt4,qsizey1) {
var theBounds1 = boundshape(0,yt4,px0-1,yt4+1);
var theBounds2 = boundshape(0,yt4-qsizey1,px0-1,yt4+1-qsizey1);
var theBounds3 = boundshape(0,yt4+qsizey1,px0-1,yt4+1+qsizey1);
var posxtext2= (theBounds1[0]+theBounds1[2]+theBounds2[0]+theBounds2[2]+theBounds3[0]+theBounds3[2])/6
var theBounds1 = boundshape(posxtext2,0,posxtext2+1,py0-1);
var qsizex1= (theBounds1[2] - theBounds1[0])/4;
var theBounds2 = boundshape(posxtext2-qsizex1,0,posxtext2+1-qsizex1,py0-1);
var theBounds3 = boundshape(posxtext2+qsizex1,0,posxtext2+1+qsizex1,py0-1);
return [Math.round(posxtext2),Math.round((theBounds1[1]+theBounds1[3]+theBounds2[1]+theBounds2[3]+theBounds3[1]+theBounds3[3])/6)]
}

function findnewpos() {
var result = [0,0,0,0,docRef.activeLayer.textItem.position[0],docRef.activeLayer.textItem.position[1],-1]
if (textlayerstate()==false) {
docRef.paste();
var theBounds = docRef.activeLayer.bounds;
result[2] = Math.round((theBounds[0]+ theBounds[2])/2);
result[3] = Math.round((theBounds[1]+ theBounds[3])/2);
docRef.activeLayer.remove();
docRef.activeLayer.visible = false
var theBounds = bubblebound(result[2],result[3]);
if (!((theBounds[2] - theBounds[0]<11)||(theBounds[3] - theBounds[1]<11)||(getlayercolor(result[2],result[3])<250))) {
createbubblelayer(result[2],result[3])
var theBounds = docRef.activeLayer.bounds;
var theWidth = theBounds[2] - theBounds[0];
var theHeight = theBounds[3] - theBounds[1];
if ((theWidth<px0-15)&&(theHeight<py0-20)&&(theHeight*theWidth<4*px0*py0)) {
var thecenter = findareacenter((theBounds[1]+ theBounds[3])/2,theHeight/4)
result[0]=thecenter[0]
result[1]=thecenter[1]
result[6]=0
}
docRef.activeLayer.remove()
}
docRef.activeLayer = LGLayer
docRef.activeLayer.visible=true
}
docRef.selection.deselect();
return result
}

if ( !(documents.length == 0)) {
docRef = activeDocument;
docRef.resizeImage(null, null, 72, ResampleMethod.NONE);
displayDialogs = DialogModes.NO
var acmode=docRef.mode
docRef.changeMode(ChangeMode.RGB);
var px0 = docRef.width
var py0 = docRef.height
var whiteColor = new SolidColor()
whiteColor.rgb.red = 255
whiteColor.rgb.green = 255
whiteColor.rgb.blue = 255
var LGLayer = docRef.activeLayer
if (docRef.activeLayer.kind == LayerKind.TEXT) {
if (docRef.activeLayer.visible) {
var newpos=findnewpos()
if (newpos[6]==0) {
docRef.activeLayer.translate(newpos[0]-newpos[2],newpos[1]-newpos[3])
};
};
};
if (acmode=="DocumentMode.GRAYSCALE") {
docRef.changeMode(ChangeMode.GRAYSCALE);
}
}

I tried to delete this code to keep old resolution

docRef.resizeImage(null, null, 72, ResampleMethod.NONE);

 but then the script wouldn't work. I don't know much about programming, so I want to ask if I'm wrong somewhere.

Thank you everyone for help. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines