|
|
On 4/4/20 9:11 AM, Bald Eagle wrote:
>
...
>
> Can you provide a working example of how to do this with the Windows font
> directory? (use a dummy Linux directory as a surrogate)
> I tried the symbolic link, but it doesn't really seem to work for me at present,
> so it apparently still needs some small tweak.
>
I'm not completely sure what you're asking. Off the top of my head I
don't know how to generically link from say the linux subsystem
on windows back into windows itself - though expect there is a way.
When I've used fonts not built into POV-Ray I've always copied the ttf
font file into the working scene directory(1). So, I've created the
scene below to try specifying the location of the font files in
different ways including creating a symbolically linked directory in my
/tmp back to my real personal font collection(see scene comment). All
tests with current v38 master.
Surprised to find a full path specification of a font file didn't work.
I always needed to extend the Library_Path to include the directory with
the particular font - works even with the full path specifies to be
elsewhere... Anyway the test scene follows. Hope some help.
Aside: On Debian based systems like Ubuntu there is a file called
/etc/fonts/fonts.conf which lists the font directories on the system.
It should be your can add one or more of these with +L or via ini file
edits once you find the ttf particular sub-directories with fonts you
want to use. I now doubt full sub-directory tree structures are searched
for font files - but not tried this.
Bill P.
(1) - So it's in the archive file when I archive it.
//------------------
#version 3.8;
global_settings { assumed_gamma 1 }
#declare Grey50 = srgb <0.5,0.5,0.5>;
background { color Grey50 }
#declare Camera00 = camera {
perspective
location <3,3,-3.001>
sky y
angle 35
right x*(image_width/image_height)
look_at <0,0,0>
}
#declare White = srgb <1,1,1>;
#declare Light00 = light_source { <50,150,-250>, White }
#declare Red = srgb <1,0,0>;
#declare CylinderX = cylinder { -1*x, 1*x, 0.01 pigment { Red } }
#declare Green = srgb <0,1,0>;
#declare CylinderY = cylinder { -1*y, 1*y, 0.01 pigment { Green } }
#declare Blue = srgb <0,0,1>;
#declare CylinderZ = cylinder { -1*z, 1*z, 0.01 pigment { Blue } }
// Point to a font file using a full path specification.
// Which does not work for me without also +L...
#declare Rose = srgb <1,0,0.49804>;
#declare Text00 = text {
ttf "/home/pokorny/Fonts/LiberationMono-Regular.ttf" "Bald_Eagle"
0.2, 0.1*x
pigment { color Rose }
scale 0.2
translate <0.05,0.05,0>
}
// Specify just the font file and then the search directory by
// extending the Library_Path via the command line:
// povray my.pov ... +L/home/pokorny/Fonts
// or in an ini file with a line like
// Library_Path=/home/pokorny/Fonts
#declare Orange = srgb <1,0.50196,0>;
#declare Text01 = text {
ttf "LiberationMono-Italic.ttf" "Bald_Eagle"
0.2, 0.1*x
pigment { color Orange }
scale 0.2
translate <0.05,0.25,0>
}
// First symbolically link font directory in xterm window with:
// ln -s /home/pokorny/Fonts /tmp/FontsSymLinkedDir
#declare Amazonite = srgb <0,0.76863,0.6902>;
#declare Text02 = text {
ttf "LiberationMono-Bold.ttf" "Bald_Eagle"
0.2, 0.1*x
pigment { color Amazonite }
scale 0.2
translate <0.05,0.45,0>
}
//--- scene ---
camera { Camera00 }
light_source { Light00 }
object { CylinderX }
object { CylinderY }
object { CylinderZ }
object { Text00 } // povray tmp.pov <- FAILS without +L below!
object { Text01 } // povray tmp.pov +L/home/pokorny/Fonts <- OK
object { Text02 } // povray tmp.pov +L/tmp/FontsSymLinkedDir <- OK
Post a reply to this message
|
|