diff --git a/bun.lockb b/bun.lockb
index b73a226..924052a 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/lib/sch/svg-object-fns/create-svg-objects-for-sch-port-pin-label.ts b/lib/sch/svg-object-fns/create-svg-objects-for-sch-port-pin-label.ts
index 4bbf84e..a66dc4f 100644
--- a/lib/sch/svg-object-fns/create-svg-objects-for-sch-port-pin-label.ts
+++ b/lib/sch/svg-object-fns/create-svg-objects-for-sch-port-pin-label.ts
@@ -40,7 +40,9 @@ export const createSvgObjectsForSchPortPinLabel = (params: {
// Transform the pin position from local to global coordinates
const screenPinNumberTextPos = applyToPoint(transform, realPinNumberPos)
- const label = schComponent.port_labels?.[`pin${schPort.pin_number}`]
+ const label =
+ schPort.display_pin_label ??
+ schComponent.port_labels?.[`pin${schPort.pin_number}`]
if (!label) return []
@@ -53,7 +55,11 @@ export const createSvgObjectsForSchPortPinLabel = (params: {
y: screenPinNumberTextPos.y.toString(),
style: "font-family: sans-serif;",
fill: colorMap.schematic.pin_number,
- "text-anchor": schPort.side_of_component === "left" ? "start" : "end",
+ "text-anchor":
+ schPort.side_of_component === "left" ||
+ schPort.side_of_component === "bottom"
+ ? "start"
+ : "end",
"dominant-baseline": "middle",
"font-size": `${getSchFontSize(transform, "pin_number")}px`,
transform:
diff --git a/package.json b/package.json
index e1b7e3f..d53d880 100644
--- a/package.json
+++ b/package.json
@@ -28,7 +28,7 @@
"@storybook/react": "^8.2.5",
"@storybook/react-vite": "^8.2.5",
"@storybook/test": "^8.2.5",
- "@tscircuit/core": "^0.0.148",
+ "@tscircuit/core": "^0.0.153",
"@tscircuit/plop": "^0.0.10",
"@types/bun": "^1.1.9",
"bun-match-svg": "^0.0.6",
diff --git a/tests/sch/__snapshots__/kicad-theme-demo.snap.svg b/tests/sch/__snapshots__/kicad-theme-demo.snap.svg
index bfad490..42e521f 100644
--- a/tests/sch/__snapshots__/kicad-theme-demo.snap.svg
+++ b/tests/sch/__snapshots__/kicad-theme-demo.snap.svg
@@ -9,4 +9,4 @@
.pin-number { fill: rgb(169, 0, 0); }
.port-label { fill: rgb(0, 100, 100); }
.component-name { fill: rgb(0, 100, 100); }
- -2,-4-2,-3-2,-2-2,-1-2,0-2,1-2,2-2,3-2,4-1,-4-1,-3-1,-2-1,-1-1,0-1,1-1,2-1,3-1,40,-40,-30,-20,-10,00,10,20,30,41,-41,-31,-21,-11,01,11,21,31,42,-42,-32,-22,-12,02,12,22,32,43,-43,-33,-23,-13,03,13,23,33,44,-44,-34,-24,-14,04,14,24,34,45,-45,-35,-25,-15,05,15,25,35,46,-46,-36,-26,-16,06,16,26,36,47,-47,-37,-27,-17,07,17,27,37,4R1C1ATmega8-16AU229RESET782019221213GND1415161723418OSC112VCC
\ No newline at end of file
+ -2,-4-2,-3-2,-2-2,-1-2,0-2,1-2,2-2,3-2,4-1,-4-1,-3-1,-2-1,-1-1,0-1,1-1,2-1,3-1,40,-40,-30,-20,-10,00,10,20,30,41,-41,-31,-21,-11,01,11,21,31,42,-42,-32,-22,-12,02,12,22,32,43,-43,-33,-23,-13,03,13,23,33,44,-44,-34,-24,-14,04,14,24,34,45,-45,-35,-25,-15,05,15,25,35,46,-46,-36,-26,-16,06,16,26,36,47,-47,-37,-27,-17,07,17,27,37,4R110ΩC11mFATmega8-16AU229RESET782019221213GND1415161723418OSC112VCC
\ No newline at end of file