summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXFont.c
diff options
context:
space:
mode:
authordas <das>2007-05-30 06:35:54 (GMT)
committerdas <das>2007-05-30 06:35:54 (GMT)
commite37ef892e06f50859941c35f85b7f07ce98d756e (patch)
treed698fa040408e94632aa7a89b0599efb12078dfb /macosx/tkMacOSXFont.c
parenteea3d8a589c007592691cf767336a06b0f600c50 (diff)
downloadtk-e37ef892e06f50859941c35f85b7f07ce98d756e.zip
tk-e37ef892e06f50859941c35f85b7f07ce98d756e.tar.gz
tk-e37ef892e06f50859941c35f85b7f07ce98d756e.tar.bz2
* macosx/tkMacOSXMenu.c (DrawMenuSeparator): use DrawingContext API.
* macosx/tkMacOSXWindowEvent.c (ClearPort): clip to updateRgn. * macosx/tkMacOSXDebug.c: factor out debug region flashing. * macosx/tkMacOSXDebug.h: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXEvent.c: cleanup whitespace and formatting. * macosx/tkMacOSXFont.c: * macosx/tkMacOSXRegion.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: * xlib/xgc.c: * macosx/Wish.xcodeproj/project.pbxproj: delete references to removed * macosx/Wish.xcodeproj/default.pbxuser: ttk files.
Diffstat (limited to 'macosx/tkMacOSXFont.c')
-rw-r--r--macosx/tkMacOSXFont.c81
1 files changed, 40 insertions, 41 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index 3804902..d745c87 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -35,7 +35,7 @@
* that such fonts can not be used for controls, because controls
* definitely require a family id (this assertion needs testing).
*
- * RCS: @(#) $Id: tkMacOSXFont.c,v 1.25 2007/05/28 17:12:31 cc_benny Exp $
+ * RCS: @(#) $Id: tkMacOSXFont.c,v 1.26 2007/05/30 06:35:54 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -797,41 +797,41 @@ TkpMeasureCharsInContext(
(uchars[offset-1] == ' ')) {
offset--;
}
- }
-
- /*
- * Fix up left-overs for the TK_WHOLE_WORDS case.
- */
-
- if (flags & TK_WHOLE_WORDS) {
- if (flags & TK_AT_LEAST_ONE) {
- /*
- * If we are the the start of the range, we need to look
- * forward. If we are not at the end of a word, we must be in
- * the middle of the first word, so we also look forward.
- */
-
- if ((offset == urstart) || (uchars[offset] != ' ')) {
- while ((offset < urend) && (uchars[offset] != ' ')) {
- offset++;
- }
- }
- } else {
- /*
- * If we are not at the end of a word, we need to look
- * backward.
- */
-
- if ((offset != urend) && (uchars[offset] != ' ')) {
- while ((offset > urstart) && (uchars[offset-1] != ' ')) {
- offset--;
- }
- while ((offset > urstart) && (uchars[offset-1] == ' ')) {
- offset--;
- }
- }
- }
- }
+ }
+
+ /*
+ * Fix up left-overs for the TK_WHOLE_WORDS case.
+ */
+
+ if (flags & TK_WHOLE_WORDS) {
+ if (flags & TK_AT_LEAST_ONE) {
+ /*
+ * If we are the the start of the range, we need to look
+ * forward. If we are not at the end of a word, we must be in
+ * the middle of the first word, so we also look forward.
+ */
+
+ if ((offset == urstart) || (uchars[offset] != ' ')) {
+ while ((offset < urend) && (uchars[offset] != ' ')) {
+ offset++;
+ }
+ }
+ } else {
+ /*
+ * If we are not at the end of a word, we need to look
+ * backward.
+ */
+
+ if ((offset != urend) && (uchars[offset] != ' ')) {
+ while ((offset > urstart) && (uchars[offset-1] != ' ')) {
+ offset--;
+ }
+ while ((offset > urstart) && (uchars[offset-1] == ' ')) {
+ offset--;
+ }
+ }
+ }
+ }
if (offset > urend) {
offset = urend;
@@ -948,13 +948,13 @@ TkpMeasureCharsInContext(
#ifdef TK_MAC_DEBUG_FONTS
TkMacOSXDbgMsg("measure: '%.*s', maxLength=%d, flags=%s%s%s%s "
- "-> width=%d, bytes=%d",
- rangeLength, source+rangeStart, maxLength,
+ "-> width=%d, bytes=%d",
+ rangeLength, source+rangeStart, maxLength,
flags & TK_PARTIAL_OK ? "partialOk " : "",
flags & TK_WHOLE_WORDS ? "wholeWords " : "",
flags & TK_AT_LEAST_ONE ? "atLeastOne " : "",
flags & TK_ISOLATE_END ? "isolateEnd " : "",
- curX, curByte);
+ curX, curByte);
#endif
*lengthPtr = curX;
@@ -2284,8 +2284,7 @@ TkMacOSXInitControlFontStyle(
* disabling of antialiased text from tcl.
* The possible values for this variable are:
*
- * -1 - Use system default as configurable in "System Preferences" ->
- * "General".
+ * -1 - Use system default as configurable in "System Prefs" -> "General".
* 0 - Unconditionally disable antialiasing.
* 1 - Unconditionally enable antialiasing.
*