4 * Copyright (C) 2011-2012 by Werner Lemberg.
6 * This file is part of the ttfautohint library, and may only be used,
7 * modified, and distributed under the terms given in `COPYING'. By
8 * continuing to use, modify, or distribute this file you indicate that you
9 * have read `COPYING' and understand and accept it fully.
11 * The file `COPYING' mentioned in the previous paragraph is distributed
12 * with the ttfautohint library.
16 /* originally file `afangles.c' (2011-Mar-28) from FreeType */
18 /* heavily modified 2011 by Werner Lemberg <wl@gnu.org> */
24 /* two bubble sort routines */
27 ta_sort_pos(FT_UInt count
,
35 for (i
= 1; i
< count
; i
++)
37 for (j
= i
; j
> 0; j
--)
39 if (table
[j
] > table
[j
- 1])
43 table
[j
] = table
[j
- 1];
51 ta_sort_widths(FT_UInt count
,
59 for (i
= 1; i
< count
; i
++)
61 for (j
= i
; j
> 0; j
--)
63 if (table
[j
].org
> table
[j
- 1].org
)
67 table
[j
] = table
[j
- 1];