FontType.cpp (pymol-v1.8.6.0.tar.bz2) | : | FontType.cpp (pymol-v2.1.0.tar.bz2) | ||
---|---|---|---|---|
skipping to change at line 64 | skipping to change at line 64 | |||
int unicnt = 0; | int unicnt = 0; | |||
sampling = info->sampling; | sampling = info->sampling; | |||
if(st && (*st)) { | if(st && (*st)) { | |||
float v_scale; | float v_scale; | |||
float screenWorldOffset[3] = { 0.0F, 0.0F, 0.0F }; | float screenWorldOffset[3] = { 0.0F, 0.0F, 0.0F }; | |||
v_scale = SceneGetScreenVertexScale(G, NULL); | v_scale = SceneGetScreenVertexScale(G, NULL); | |||
if(size < _0) { | if(size < _0) { | |||
size = (int) (0.5F - size / v_scale); | size = (int) (0.5F - size / v_scale); | |||
if (size <= 0) | ||||
size = 1; | ||||
} else { | ||||
size = DIP2PIXEL(size); | ||||
} | } | |||
if(rpos) { | if(rpos) { | |||
if(rpos[0] < _1) { /* we need to measure the string width before st arting to draw */ | if(rpos[0] < _1) { /* we need to measure the string width before st arting to draw */ | |||
const char *sst = st; | const char *sst = st; | |||
while((c = *(sst++))) { | while((c = *(sst++))) { | |||
if(unicnt) { | if(unicnt) { | |||
if(!(c & 0x80)) /* corrupt UTF8 */ | if(!(c & 0x80)) /* corrupt UTF8 */ | |||
unicnt = 0; | unicnt = 0; | |||
else { | else { | |||
skipping to change at line 294 | skipping to change at line 298 | |||
scale3f(loc, z_indent, loc); | scale3f(loc, z_indent, loc); | |||
add3f(v, loc, loc); | add3f(v, loc, loc); | |||
TextSetPos(I->G, loc); | TextSetPos(I->G, loc); | |||
} | } | |||
RayGetScaledAxes(ray, xn, yn); | RayGetScaledAxes(ray, xn, yn); | |||
if(size < _0) { | if(size < _0) { | |||
size = (int) (0.5F - size / v_scale); | size = (int) (0.5F - size / v_scale); | |||
} else { | ||||
size = DIP2PIXEL(size); | ||||
} | } | |||
if(rpos) { | if(rpos) { | |||
if(rpos[0] < _1) { /* we need to measure the string width before st arting to draw */ | if(rpos[0] < _1) { /* we need to measure the string width before st arting to draw */ | |||
float factor = rpos[0] / 2.0F - 0.5F; | float factor = rpos[0] / 2.0F - 0.5F; | |||
const char *sst = st; | const char *sst = st; | |||
factor = (factor < _m1) ? _m1 : (factor > _0) ? _0 : factor; | factor = (factor < _m1) ? _m1 : (factor > _0) ? _0 : factor; | |||
while((c = *(sst++))) { | while((c = *(sst++))) { | |||
if(unicnt) { | if(unicnt) { | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 6 lines changed or added |