Half a jìn and eight liǎngs (see Notes section)
To be equally matched with the other party; to be almost the same
Neutral
Six of one, half a dozen of the other
None
A jìn (斤) is an ancient unit of weight roughly equal to 1.1 pounds (0.5 kilograms), and sixteen liǎng (两) made up one 斤. As such, the literal translation of the chengyu — half a 斤 and eight 两 — refers to the same weight being measured in two different units
In Chinese, each character is composed of a predetermined number of lines, or "strokes." The characters written by the emperor, 天下公平 (tiān xià gōng píng), are made up of a total of 16 strokes. The breakdown is as follows: 天 (4 strokes), 下 (3 strokes), 公 (5 strokes), and 平 (4 strokes)
《五灯会元》(Wǔ Dēng Huì Yuán), a Sòng Dynasty (宋, 960-1279) collection of scrolls on Zen Buddhism in China by 释普济 (Shì Pǔ Jǐ)
Before the Qín Dynasty (秦, 221 - 207 BC), different kingdoms in China all used different types of currency and systems of measurement. Of course, this made engaging in trade between kingdoms extremely difficult, as vendors and buyers would have to constantly convert between units.
When 秦始皇 (Qín Shǐ Huáng) unified those countries under his Qín Dynasty, he ordered a man named 李斯 (Lǐ Sī) to establish a standard system of length, capacity, and weight. The standard units for length and capacity had mostly been established, but 李斯 was having a hard time ironing out the units for weight. He therefore went to the emperor to ask for guidance.
The emperor responded to the request by lifting a brush and writing out four large characters: 天下公平 (tiān xià gōng píng). Unfortunately, 李斯 had no idea what this meant, but he didn't dare ask the emperor for clarification. In the end, he just added up the number of strokes in all of the characters and used that number (sixteen) in his weight system. For the next 2000 years or so, one 斤 (jìn) was therefore equal to sixteen 两 (liǎng).