Bonjour

J utilise un script .jsx qui devrait marcher avec CS2

Ainsi qu une fonte personnalisee :


Code:
Nom();
function Nom()
{
  var docRef = activeDocument

  var posHoriz = activeDocument.width*(5.2/100);    //je donne un pourcentage de la taille du document
  var posVertic = activeDocument.height*(99/100);    //pour la position du texte

  Opacite = 100 ; // reglage de la transparence du calque texte ( de 0 a 100 )
  //var TailleFonte = 14;

  TailleFonteW = activeDocument.width*(0.54/100);
  TailleFonteH = activeDocument.height*(0.54/100);

  if ( activeDocument.width>activeDocument.heigth )
  {
    TailleFonte =  TailleFonteW 
  }
  else
  {
    TailleFonte =  TailleFonteH
  }


  //alert( TailleFonte )


  fontPostScriptName = "AdeRaimondBONfonts" //"ParkAvenueBT-Regular"
  //NomPolice = "ParkAvenue BT"

  app.displayDialogs = DialogModes.NO;
  app.preferences.typeUnits = TypeUnits.POINTS;

  var textColor = new SolidColor;
  textColor.rgb.red = 201;
  textColor.rgb.green = 70;
  textColor.rgb.blue = 70;
  textColor.opacity = 100;

  monNom = "Alain de RAIMOND";

  var newTextLayer = docRef.artLayers.add();

  newTextLayer.kind = LayerKind.TEXT;
  newTextLayer.textItem.contents = monNom;
  newTextLayer.textItem.position = Array(posHoriz, posVertic);

  newTextLayer.textItem.font = fontPostScriptName;
  //newTextLayer.textItem.name = NomPolice

  newTextLayer.textItem.size = TailleFonte;
  newTextLayer.textItem.color = textColor;
  newTextLayer.opacity = Opacite;

  docRef.flatten();   //aplatir  

  if ( docRef.colorSamplers.length !=0 )
  {
    docRef.colorSamplers.removeAll() //supprime tous les marquages de pipette 
  }
}